* in all enabled CiviCRM module extensions.
*
* @param bool $descriptions
- * @param array $permissions
*
* @return array
* Array of permissions, in the same format as CRM_Core_Permission::getCorePermissions().
*/
- public function getAllModulePermissions($descriptions = FALSE, &$permissions): array {
- $newPermissions = [];
- CRM_Utils_Hook::permission($newPermissions, $permissions);
- $permissions = array_merge($permissions, $newPermissions);
+ public function getAllModulePermissions($descriptions = FALSE): array {
+ $permissions = [];
+ CRM_Utils_Hook::permission($permissions);
if ($descriptions) {
foreach ($permissions as $permission => $label) {
*
* @param array $newPermissions
* Array to be filled with permissions.
- * @param array $permissions
- * Already calculated permissions. These can be altered. Notably an
- * extension might want to add it's permissions to 'implied' or to
- * remove some permissions.
*
* @return null
* The return value is ignored
*/
- public static function permission(&$newPermissions, &$permissions) {
- return self::singleton()->invoke(['permissions', 'all_permissions'], $newPermissions, $permissions,
+ public static function permission(&$newPermissions) {
+ return self::singleton()->invoke(['permissions'], $newPermissions, self::$_nullObject,
self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
'civicrm_permission'
);