You are here

public function Auth::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/tests/modules/early_translation_test/src/Auth.php \Drupal\early_translation_test\Auth::__construct()

Constructs an authentication provider object.

Parameters

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service.

File

core/modules/locale/tests/modules/early_translation_test/src/Auth.php, line 32
Contains \Drupal\early_translation_test\Auth.

Class

Auth
Test authentication provider.

Namespace

Drupal\early_translation_test

Code

public function __construct(EntityManagerInterface $entity_manager) {

  // Authentication providers are called early during in the bootstrap.
  // Getting the user storage used to result in a circular reference since
  // translation involves a call to \Drupal\locale\LocaleLookup that tries to
  // get the user roles.
  // @see https://www.drupal.org/node/2241461
  $this->userStorage = $entity_manager
    ->getStorage('user');
}