public function Auth::__construct in Drupal 8
Same name and namespace in other branches
- 9 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\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
File
- core/
modules/ locale/ tests/ modules/ early_translation_test/ src/ Auth.php, line 27
Class
- Auth
- Test authentication provider.
Namespace
Drupal\early_translation_testCode
public function __construct(EntityTypeManagerInterface $entity_type_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_type_manager
->getStorage('user');
}