protected function UserSession::getRoleStorage

protected 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 204

Class

UserSession
An implementation of the user account interface for the global user.

Namespace

Drupal\Core\Session

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Session!UserSession.php/function/UserSession::getRoleStorage/8.1.x