public function ProjectPermissions::generatePermissions in Drupal PM (Project Management) 4.x
Returns an array of node type permissions.
Return value
array The Project by bundle permissions. @see \Drupal\user\PermissionHandlerInterface::getPermissions()
1 string reference to 'ProjectPermissions::generatePermissions'
- pm_project.permissions.yml in modules/
pm_project/ pm_project.permissions.yml - modules/pm_project/pm_project.permissions.yml
File
- modules/
pm_project/ src/ ProjectPermissions.php, line 24
Class
- ProjectPermissions
- Provides dynamic permissions for Project of different types.
Namespace
Drupal\pm_projectCode
public function generatePermissions() {
$perms = [];
foreach (Project::loadMultiple() as $type) {
$perms += $this
->buildPermissions($type);
}
return $perms;
}