function SwitchUserController::__construct

Same name in other branches
  1. 8.x-1.x src/Controller/SwitchUserController.php \Drupal\devel\Controller\SwitchUserController::__construct()

Constructs a new SwitchUserController object.

Parameters

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

\Drupal\Core\Entity\EntityStorageInterface $user_storage: 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.

File

src/Controller/SwitchUserController.php, line 61

Class

SwitchUserController
Controller for switch to another user account.

Namespace

Drupal\devel\Controller

Code

public function __construct(AccountProxyInterface $account, EntityStorageInterface $user_storage, ModuleHandlerInterface $module_handler, SessionManagerInterface $session_manager, Session $session) {
    $this->account = $account;
    $this->userStorage = $user_storage;
    $this->moduleHandler = $module_handler;
    $this->sessionManager = $session_manager;
    $this->session = $session;
}