/** * Get the permissions defined in the hook_civicrm_permission implementation * in all enabled CiviCRM module extensions. * * @return array * Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions(). */ public function getAllModulePermissions($descriptions = FALSE) { $permissions = array(); CRM_Utils_Hook::permission($permissions); if ($descriptions) { foreach ($permissions as $permission => $label) { $permissions[$permission] = is_array($label) ? $label : array($label); } } else { foreach ($permissions as $permission => $label) { $permissions[$permission] = is_array($label) ? array_shift($label) : $label; } } return $permissions; }
/** * Get the permissions defined in the hook_civicrm_permission implementation * in all enabled CiviCRM module extensions. * * @return Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions(). */ function getAllModulePermissions() { $permissions = array(); CRM_Utils_Hook::permission($permissions); return $permissions; }