function MaintenanceModeSubscriber::getSubscribedEvents

Same name in this branch
  1. 9 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
Same name in other branches
  1. 8.9.x core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
  2. 8.9.x core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
  3. 10 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
  4. 10 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
  5. 11.x core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()
  6. 11.x core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::getSubscribedEvents()

File

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

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',
    ];
    $events[MaintenanceModeEvents::MAINTENANCE_MODE_REQUEST][] = [
        'onMaintenanceModeRequest',
        -1000,
    ];
    return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.