[NFC] Add in convertDeprecationsToExceptions='true' to core extension's phpunit.xml...
[civicrm-core.git] / ext / oauth-client / oauth_client.php
index 84930ee6c44d82b11cfa63837203e1f1ebf3dfa8..a4d6e1592d4f2c1e35e4525485c995021dfdd27d 100644 (file)
@@ -14,27 +14,6 @@ function oauth_client_civicrm_config(&$config) {
   _oauth_client_civix_civicrm_config($config);
 }
 
-/**
- * Implements hook_civicrm_xmlMenu().
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu
- */
-function oauth_client_civicrm_xmlMenu(&$files) {
-  _oauth_client_civix_civicrm_xmlMenu($files);
-}
-
-/**
- * Implements hook_civicrm_managed().
- *
- * Generate a list of entities to create/deactivate/delete when this module
- * is installed, disabled, uninstalled.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed
- */
-function oauth_client_civicrm_managed(&$entities) {
-  _oauth_client_civix_civicrm_managed($entities);
-}
-
 /**
  * Implements hook_civicrm_permission().
  *
@@ -51,42 +30,18 @@ function oauth_client_civicrm_permission(&$permissions) {
     $prefix . ts('manage OAuth client secrets'),
     ts('Access OAuth secrets'),
   ];
-}
-
-/**
- * Implements hook_civicrm_caseTypes().
- *
- * Generate a list of case-types.
- *
- * Note: This hook only runs in CiviCRM 4.4+.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_caseTypes
- */
-function oauth_client_civicrm_caseTypes(&$caseTypes) {
-  _oauth_client_civix_civicrm_caseTypes($caseTypes);
-}
-
-/**
- * Implements hook_civicrm_angularModules().
- *
- * Generate a list of Angular modules.
- *
- * Note: This hook only runs in CiviCRM 4.5+. It may
- * use features only available in v4.6+.
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
- */
-function oauth_client_civicrm_angularModules(&$angularModules) {
-  _oauth_client_civix_civicrm_angularModules($angularModules);
-}
-
-/**
- * Implements hook_civicrm_alterSettingsFolders().
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterSettingsFolders
- */
-function oauth_client_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) {
-  _oauth_client_civix_civicrm_alterSettingsFolders($metaDataFolders);
+  $permissions['create OAuth tokens via auth code flow'] = [
+    $prefix . ts('create OAuth tokens via auth code flow'),
+    ts('Create OAuth tokens via the authorization code flow'),
+  ];
+  $permissions['manage my OAuth contact tokens'] = [
+    $prefix . ts('manage my OAuth contact tokens'),
+    ts("Manage user's own OAuth tokens"),
+  ];
+  $permissions['manage all OAuth contact tokens'] = [
+    $prefix . ts('manage all OAuth contact tokens'),
+    ts("Manage OAuth tokens for all contacts"),
+  ];
 }
 
 /**
@@ -100,13 +55,6 @@ function oauth_client_civicrm_entityTypes(&$entityTypes) {
   _oauth_client_civix_civicrm_entityTypes($entityTypes);
 }
 
-/**
- * Implements hook_civicrm_thems().
- */
-function oauth_client_civicrm_themes(&$themes) {
-  _oauth_client_civix_civicrm_themes($themes);
-}
-
 // --- Functions below this ship commented out. Uncomment as required. ---
 
 /**