public static function AccessDeniedSubscriber::getSubscribedEvents in Drupal 9
Same name and namespace in other branches
- 8 core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\user\EventSubscriber\AccessDeniedSubscriber::getSubscribedEvents()
File
- core/
modules/ user/ src/ EventSubscriber/ AccessDeniedSubscriber.php, line 81
Class
- AccessDeniedSubscriber
- Redirects users when access is denied.
Namespace
Drupal\user\EventSubscriberCode
public static function getSubscribedEvents() {
// Use a higher priority than
// \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber, because there's
// no need to log the exception if we can redirect.
$events[KernelEvents::EXCEPTION][] = [
'onException',
75,
];
return $events;
}