You are here

public function SwitchController::__construct in Masquerade 8.2

Constructs a new SwitchController object.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\masquerade\Masquerade $masquerade: The masquerade service.

\Drupal\Core\Routing\RedirectDestinationInterface $destination: The redirect destination helper.

File

src/Controller/SwitchController.php, line 44

Class

SwitchController
Controller for switch and back to masquerade as user.

Namespace

Drupal\masquerade\Controller

Code

public function __construct(AccountInterface $current_user, Masquerade $masquerade, RedirectDestinationInterface $destination) {
  $this->currentUser = $current_user;
  $this->masquerade = $masquerade;
  $this->destination = $destination;
}