function 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 101 
Class
- Role
- Defines the user role entity class.
Namespace
Drupal\user\EntityCode
public function getPermissions() {
  if ($this->isAdmin()) {
    return [];
  }
  return $this->permissions;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
