function AccountSwitcher::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::__construct()
  2. 10 core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::__construct()
  3. 9 core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::__construct()
  4. 8.9.x core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::__construct()

Constructs a new AccountSwitcher.

Parameters

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user service.

\Drupal\Core\Session\WriteSafeSessionHandlerInterface $writeSafeHandler: The write-safe session handler.

File

core/lib/Drupal/Core/Session/AccountSwitcher.php, line 36

Class

AccountSwitcher
An implementation of AccountSwitcherInterface.

Namespace

Drupal\Core\Session

Code

public function __construct(protected AccountProxyInterface $currentUser, protected WriteSafeSessionHandlerInterface $writeSafeHandler) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.