interface DelegatableRolesInterface in Role Delegation 8
Interface DelegatableRolesInterface.
@package Drupal\role_delegation
Hierarchy
- interface \Drupal\role_delegation\DelegatableRolesInterface
Expanded class hierarchy of DelegatableRolesInterface
All classes that implement DelegatableRolesInterface
1 file declares its use of DelegatableRolesInterface
File
- src/
DelegatableRolesInterface.php, line 12
Namespace
Drupal\role_delegationView source
interface DelegatableRolesInterface {
/**
* Gets the roles a user is allowed to assing.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The account for which you want to know which roles they can assign.
*
* @return array
* An array of roles with machine names as keys and labels as values.
*/
public function getAssignableRoles(AccountInterface $account);
/**
* Gets all roles apart from anonymous and authenticated.
*
* @return \Drupal\user\RoleInterface[]
* An array of role objects.
*/
public function getAllRoles();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DelegatableRolesInterface:: |
public | function | Gets all roles apart from anonymous and authenticated. | 1 |
DelegatableRolesInterface:: |
public | function | Gets the roles a user is allowed to assing. | 1 |