RoleInterface::setWeight

public RoleInterface::setWeight($weight) Sets the weight to the given value. Parameters int $weight: The desired weight. Return value $this File core/modules/user/src/RoleInterface.php, line 98 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function setWeight($weight);

RoleInterface::setIsAdmin

public RoleInterface::setIsAdmin($is_admin) Sets the role to be an admin role. Parameters bool $is_admin: TRUE if the role should be an admin role. Return value $this File core/modules/user/src/RoleInterface.php, line 80 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function setIsAdmin($is_admin);

RoleInterface::revokePermission

public RoleInterface::revokePermission($permission) Revokes a permissions from the user role. Parameters string $permission: The permission to revoke. Return value $this File core/modules/user/src/RoleInterface.php, line 62 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function revokePermission($permission);

RoleInterface::isAdmin

public RoleInterface::isAdmin() Indicates that a role has all available permissions. Return value bool TRUE if the role has all permissions. File core/modules/user/src/RoleInterface.php, line 70 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function isAdmin();

RoleInterface::hasPermission

public RoleInterface::hasPermission($permission) Checks if the role has a permission. Parameters string $permission: The permission to check for. Return value bool TRUE if the role has the permission, FALSE if not. File core/modules/user/src/RoleInterface.php, line 42 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function hasPermission($permission);

RoleInterface::grantPermission

public RoleInterface::grantPermission($permission) Grant permissions to the role. Parameters string $permission: The permission to grant. Return value $this File core/modules/user/src/RoleInterface.php, line 52 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function grantPermission($permission);

RoleInterface::getWeight

public RoleInterface::getWeight() Returns the weight. Return value int The weight of this role. File core/modules/user/src/RoleInterface.php, line 88 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function getWeight();

RoleInterface::getPermissions

public RoleInterface::getPermissions() Returns a list of permissions assigned to the role. Return value array The permissions assigned to the role. File core/modules/user/src/RoleInterface.php, line 31 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function getPermissions();

RoleInterface::AUTHENTICATED_ID

Role ID for authenticated users; should match what's in the "role" table. File core/modules/user/src/RoleInterface.php, line 23 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code const AUTHENTICATED_ID = AccountInterface::AUTHENTICATED_ROLE;

RoleInterface::ANONYMOUS_ID

Role ID for anonymous users; should match what's in the "role" table. File core/modules/user/src/RoleInterface.php, line 18 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code const ANONYMOUS_ID = AccountInterface::ANONYMOUS_ROLE;