public function AccessDeniedSubscriber::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\user\EventSubscriber\AccessDeniedSubscriber::__construct()
- 9 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\EventSubscriberCode
public function __construct(AccountInterface $account) {
$this->account = $account;
}