public AccessDeniedSubscriber::__construct(AccountInterface $account, UrlGeneratorInterface $url_generator)
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 41
Class
- AccessDeniedSubscriber
- Redirects users when access is denied.
Namespace
Drupal\user\EventSubscriber
Code
public function __construct(AccountInterface $account, UrlGeneratorInterface $url_generator) { $this->account = $account; $this->setUrlGenerator($url_generator); }
Please login to continue.