Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AccountSwitcher.php

function AccountSwitcher::__construct

Constructs a new AccountSwitcher.

Parameters

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

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

File

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

Class

AccountSwitcher
An implementation of AccountSwitcherInterface.

Namespace

Drupal\Core\Session

Code

public function __construct(AccountProxyInterface $current_user, WriteSafeSessionHandlerInterface $write_safe_handler) {
    $this->currentUser = $current_user;
    $this->writeSafeHandler = $write_safe_handler;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal