Search for role

  1. Search 7.x for role
  2. Search 9.5.x for role
  3. Search 10.3.x for role
  4. Search 11.x for role
  5. Other projects

Exact matches

These are exact matches according to your search
Title Object type File name Summary
Role class core/modules/user/src/Entity/Role.php Defines the user role entity class.
Role class core/modules/user/src/Plugin/views/access/Role.php Access plugin that provides role-based access control.
Role class core/modules/user/src/Plugin/migrate/source/d6/Role.php Drupal 6 role source from database.
Role class core/modules/user/src/Plugin/migrate/source/d7/Role.php Drupal 7 role source from database.

All search results

Title Object type File name Summary
UserRoleAdminTest::$adminUser property core/modules/user/tests/src/Functional/UserRoleAdminTest.php User with admin privileges.
UserRoleAdminTest::$defaultTheme property core/modules/user/tests/src/Functional/UserRoleAdminTest.php The theme to install as the default for testing.
UserRoleAdminTest::$modules property core/modules/user/tests/src/Functional/UserRoleAdminTest.php Modules to enable.
UserRoleAdminTest::setUp function core/modules/user/tests/src/Functional/UserRoleAdminTest.php
UserRoleAdminTest::testRoleAdministration function core/modules/user/tests/src/Functional/UserRoleAdminTest.php Test adding, renaming and deleting roles.
UserRoleAdminTest::testRoleWeightOrdering function core/modules/user/tests/src/Functional/UserRoleAdminTest.php Test user role weight change operation and ordering.
UserRoleConditionTest class core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php Tests the user role condition.
UserRoleConditionTest.php file core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
UserRoleConditionTest::$anonymous property core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php An anonymous user for testing purposes.
UserRoleConditionTest::$authenticated property core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php An authenticated user for testing purposes.
UserRoleConditionTest::$manager property core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php The condition plugin manager.
UserRoleConditionTest::$modules property core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php Modules to enable.
UserRoleConditionTest::$role property core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php A custom role for testing purposes.
UserRoleConditionTest::setUp function core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php
UserRoleConditionTest::testConditions function core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php Test the user_role condition.
UserRoleDeleteTest class core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php Tests the handling of user_role entity from the user module
UserRoleDeleteTest.php file core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
UserRoleDeleteTest::$modules property core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php Modules to enable.
UserRoleDeleteTest::setUp function core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
UserRoleDeleteTest::testRoleDeleteUserRoleReferenceDelete function core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php Tests removal of role references on role entity delete.
UserRoleEntityTest class core/modules/user/tests/src/Kernel/UserRoleEntityTest.php @group user
UserRoleEntityTest.php file core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
UserRoleEntityTest::$modules property core/modules/user/tests/src/Kernel/UserRoleEntityTest.php Modules to enable.
UserRoleEntityTest::testOrderOfPermissions function core/modules/user/tests/src/Kernel/UserRoleEntityTest.php
UserRolesAssignmentTest class core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php Tests that users can be assigned and unassigned roles.
UserRolesAssignmentTest.php file core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
UserRolesAssignmentTest::$defaultTheme property core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php The theme to install as the default for testing.
UserRolesAssignmentTest::setUp function core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
UserRolesAssignmentTest::testAssignAndRemoveRole function core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php Tests that a user can be assigned a role and that the role can be removed
again.
UserRolesAssignmentTest::testCreateUserWithRole function core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php Tests that when creating a user the role can be assigned. And that it can
be removed again.
UserRolesAssignmentTest::userLoadAndCheckRoleAssigned function core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php Check role on user object.
UserRolesCacheContext class core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Defines the UserRolesCacheContext service, for "per role" caching.
UserRolesCacheContext.php file core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php
UserRolesCacheContext::getCacheableMetadata function core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Gets the cacheability metadata for the context based on the parameter value.
UserRolesCacheContext::getContext function core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Returns the string representation of the cache context.
UserRolesCacheContext::getLabel function core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Returns the label of the cache context.
UserSession::$roles property core/lib/Drupal/Core/Session/UserSession.php List of the roles this user has.
UserSession::getRoles function core/lib/Drupal/Core/Session/UserSession.php Returns a list of roles.
UserSession::getRoleStorage function core/lib/Drupal/Core/Session/UserSession.php Returns the role storage object.
UserSessionTest::testUserGetRoles function core/tests/Drupal/Tests/Core/Session/UserSessionTest.php Tests the method getRoles exclude or include locked roles based in param.
UserStorage::deleteRoleReferences function core/modules/user/src/UserStorage.php Delete role references.
UserStorageInterface::deleteRoleReferences function core/modules/user/src/UserStorageInterface.php Delete role references.
UserTest::testQueryInvolvingRoles function core/modules/jsonapi/tests/src/Functional/UserTest.php Test good error DX when trying to filter users by role.
UserTest::testUserGetRoles function core/modules/user/tests/src/Unit/Plugin/Core/Entity/UserTest.php Tests the method getRoles exclude or include locked roles based in param.
user_roles function core/modules/user/user.module Retrieve an array of roles matching specified conditions.
user_role_change_permissions function core/modules/user/user.module Change permissions for a user role.
user_role_grant_permissions function core/modules/user/user.module Grant permissions to a user role.
user_role_load function core/modules/user/user.module Fetches a user role by role ID.
user_role_names function core/modules/user/user.module Retrieves the names of roles matching specified conditions.
user_role_permissions function core/modules/user/user.module Determine the permissions for one or more roles.

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