public function SwitchUserController::__construct in Devel 8
Same name and namespace in other branches
- 8.3 src/Controller/SwitchUserController.php \Drupal\devel\Controller\SwitchUserController::__construct()
- 8.2 src/Controller/SwitchUserController.php \Drupal\devel\Controller\SwitchUserController::__construct()
- 4.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\ControllerCode
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;
}