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; }
Please login to continue.