public function CommentPermissions::commentTypePermissions in Comment Permissions 8
Returns an array of comment type permissions.
Return value
array The comment type permissions @see \Drupal\user\PermissionHandlerInterface::getPermissions()
1 string reference to 'CommentPermissions::commentTypePermissions'
File
- src/
CommentPermissions.php, line 22
Class
- CommentPermissions
- Provide dynamic permissions for comments of different types.
Namespace
Drupal\comment_permCode
public function commentTypePermissions() {
$perm = array();
// Generate comment permissions for all comment types.
foreach (CommentType::loadMultiple() as $type) {
$perm += $this
->buildPermissions($type);
}
return $perm;
}