You are here

public function OrganizationPermissions::generatePermissions in Drupal PM (Project Management) 4.x

Returns an array of node type permissions.

Return value

array The Organization by bundle permissions. @see \Drupal\user\PermissionHandlerInterface::getPermissions()

1 string reference to 'OrganizationPermissions::generatePermissions'
pm_organization.permissions.yml in modules/pm_organization/pm_organization.permissions.yml
modules/pm_organization/pm_organization.permissions.yml

File

modules/pm_organization/src/OrganizationPermissions.php, line 24

Class

OrganizationPermissions
Provides dynamic permissions for Organization of different types.

Namespace

Drupal\pm_organization

Code

public function generatePermissions() {
  $perms = [];
  foreach (Organization::loadMultiple() as $type) {
    $perms += $this
      ->buildPermissions($type);
  }
  return $perms;
}