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