}
/**
- * Get the current permission of this user.
+ * Get the maximum permission of the current user with respect to _any_ contact records.
*
- * @return string
- * the permission of the user (edit or view or null)
+ * @return int|string|null
+ * @see \CRM_Core_Permission::getPermission()
*/
public function getPermission() {
$this->group();
* 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) {