You are here

public static function MaintenanceModeSubscriber::getSubscribedEvents in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
  2. 8 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()

File

core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php, line 157

Class

MaintenanceModeSubscriber
Maintenance mode subscriber for controller requests.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events[KernelEvents::REQUEST][] = [
    'onKernelRequestMaintenance',
    30,
  ];
  $events[KernelEvents::EXCEPTION][] = [
    'onKernelRequestMaintenance',
  ];
  return $events;
}