protected function UserSession::getRoleStorage in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Session/UserSession.php \Drupal\Core\Session\UserSession::getRoleStorage()
- 9 core/lib/Drupal/Core/Session/UserSession.php \Drupal\Core\Session\UserSession::getRoleStorage()
Returns the role storage object.
Return value
\Drupal\user\RoleStorageInterface The role storage object.
File
- core/
lib/ Drupal/ Core/ Session/ UserSession.php, line 197
Class
- UserSession
- An implementation of the user account interface for the global user.
Namespace
Drupal\Core\SessionCode
protected function getRoleStorage() {
return \Drupal::entityTypeManager()
->getStorage('user_role');
}