Role::getPermissions

public Role::getPermissions()

Returns a list of permissions assigned to the role.

Return value

array The permissions assigned to the role.

Overrides RoleInterface::getPermissions

File

core/modules/user/src/Entity/Role.php, line 87

Class

Role
Defines the user role entity class.

Namespace

Drupal\user\Entity

Code

public function getPermissions() {
  if ($this->isAdmin()) {
    return [];
  }
  return $this->permissions;
}
doc_Drupal
2016-10-29 09:38:43
Comments
Leave a Comment

Please login to continue.