You are here

public static function AccessDeniedSubscriber::getSubscribedEvents in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\user\EventSubscriber\AccessDeniedSubscriber::getSubscribedEvents()

File

core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php, line 78

Class

AccessDeniedSubscriber
Redirects users when access is denied.

Namespace

Drupal\user\EventSubscriber

Code

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;
}