You are here

public function AnonymousUserResponseSubscriber::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber::__construct()
  2. 10 core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber::__construct()

Constructs an AnonymousUserResponseSubscriber object.

Parameters

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

File

core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php, line 30

Class

AnonymousUserResponseSubscriber
Response subscriber to handle finished responses for the anonymous user.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(AccountInterface $current_user) {
  $this->currentUser = $current_user;
}