function AccessDeniedSubscriber::__construct

Same name in other branches
  1. 9 core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\user\EventSubscriber\AccessDeniedSubscriber::__construct()
  2. 8.9.x core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\user\EventSubscriber\AccessDeniedSubscriber::__construct()
  3. 10 core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\user\EventSubscriber\AccessDeniedSubscriber::__construct()

Constructs a new redirect subscriber.

Parameters

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

File

core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php, line 35

Class

AccessDeniedSubscriber
Redirects users when access is denied.

Namespace

Drupal\user\EventSubscriber

Code

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

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