interface RoleStorageInterface

Same name and namespace in other branches
  1. 11.x core/modules/user/src/RoleStorageInterface.php \Drupal\user\RoleStorageInterface

Defines an interface for role entity storage classes.

Hierarchy

Expanded class hierarchy of RoleStorageInterface

All classes that implement RoleStorageInterface

6 files declare their use of RoleStorageInterface
EntityPermissionsForm.php in core/modules/user/src/Form/EntityPermissionsForm.php
EntityPermissionsFormTest.php in core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php
Role.php in core/modules/user/src/Plugin/views/access/Role.php
Roles.php in core/modules/user/src/Plugin/views/filter/Roles.php
RoleSettingsForm.php in core/modules/user/src/Form/RoleSettingsForm.php

... See full list

File

core/modules/user/src/RoleStorageInterface.php, line 10

Namespace

Drupal\user
View source
interface RoleStorageInterface extends ConfigEntityStorageInterface {
  
  /**
   * Returns whether a permission is in one of the passed in roles.
   *
   * @param string $permission
   *   The permission.
   * @param array $rids
   *   The list of role IDs to check.
   *
   * @return bool
   *   TRUE is the permission is in at least one of the roles. FALSE otherwise.
   */
  public function isPermissionInRoles($permission, array $rids);

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.