Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. User.php

function User::getRoleStorage

Returns the role storage object.

Return value

\Drupal\user\RoleStorageInterface The role storage object.

File

core/modules/user/src/Entity/User.php, line 585

Class

User
Defines the user entity class.

Namespace

Drupal\user\Entity

Code

protected function getRoleStorage() {
    return \Drupal::entityTypeManager()->getStorage('user_role');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal