You are here

public function AccessDeniedSubscriber::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 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 37

Class

AccessDeniedSubscriber
Redirects users when access is denied.

Namespace

Drupal\user\EventSubscriber

Code

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