You are here

public function ContextUserAuth::__construct in TMGMT Translator Smartling 8

Same name and namespace in other branches
  1. 8.4 src/Context/ContextUserAuth.php \Drupal\tmgmt_smartling\Context\ContextUserAuth::__construct()
  2. 8.2 src/Context/ContextUserAuth.php \Drupal\tmgmt_smartling\Context\ContextUserAuth::__construct()
  3. 8.3 src/Context/ContextUserAuth.php \Drupal\tmgmt_smartling\Context\ContextUserAuth::__construct()

Constructs a new SwitchUserController object

Parameters

\Drupal\Core\Session\AccountProxyInterface $account: The current user.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The user storage.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The user storage.

\Drupal\Core\Session\SessionManagerInterface $session_manager: The session manager service.

\Symfony\Component\HttpFoundation\Session\Session $session: The session.

\Psr\Log\LoggerInterface $logger:

File

src/Context/ContextUserAuth.php, line 68

Class

ContextUserAuth

Namespace

Drupal\tmgmt_smartling\Context

Code

public function __construct(AccountProxyInterface $account, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, SessionManagerInterface $session_manager, Session $session, LoggerInterface $logger) {
  $this->account = $account;
  $this->userStorage = $entity_manager
    ->getStorage('user');
  $this->moduleHandler = $module_handler;
  $this->sessionManager = $session_manager;
  $this->session = $session;
  $this->logger = $logger;
}