public function AccessDeniedSubscriber::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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.
\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.
File
- core/
modules/ user/ src/ EventSubscriber/ AccessDeniedSubscriber.php, line 46 - Contains \Drupal\user\EventSubscriber\AccessDeniedSubscriber.
Class
- AccessDeniedSubscriber
- Redirects users when access is denied.
Namespace
Drupal\user\EventSubscriberCode
public function __construct(AccountInterface $account, URLGeneratorInterface $url_generator) {
$this->account = $account;
$this
->setUrlGenerator($url_generator);
}