You are here

public function Role::getPermissions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Entity/Role.php \Drupal\user\Entity\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 92
Contains \Drupal\user\Entity\Role.

Class

Role
Defines the user role entity class.

Namespace

Drupal\user\Entity

Code

public function getPermissions() {
  if ($this
    ->isAdmin()) {
    return [];
  }
  return $this->permissions;
}