You are here

interface DelegatableRolesInterface in Role Delegation 8

Interface DelegatableRolesInterface.

@package Drupal\role_delegation

Hierarchy

Expanded class hierarchy of DelegatableRolesInterface

All classes that implement DelegatableRolesInterface

1 file declares its use of DelegatableRolesInterface
RoleDelegationSettingsForm.php in src/Form/RoleDelegationSettingsForm.php

File

src/DelegatableRolesInterface.php, line 12

Namespace

Drupal\role_delegation
View 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

Namesort descending Modifiers Type Description Overrides
DelegatableRolesInterface::getAllRoles public function Gets all roles apart from anonymous and authenticated. 1
DelegatableRolesInterface::getAssignableRoles public function Gets the roles a user is allowed to assing. 1