public function MessagePermissions::messageTemplatePermissions in Message UI 8
Gets an array of message type permissions.
Return value
array The message template permissions.
See also
\Drupal\user\PermissionHandlerInterface::getPermissions()
1 string reference to 'MessagePermissions::messageTemplatePermissions'
File
- src/
MessagePermissions.php, line 23
Class
- MessagePermissions
- Defines a class containing permission callbacks.
Namespace
Drupal\message_uiCode
public function messageTemplatePermissions() {
$perms = [];
// Generate node permissions for all message templates.
foreach (MessageTemplate::loadMultiple() as $template) {
$perms += $this
->buildPermissions($template);
}
return $perms;
}