You are here

public static function RngRequestSubscriber::getSubscribedEvents in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/EventSubscriber/RngRequestSubscriber.php \Drupal\rng\EventSubscriber\RngRequestSubscriber::getSubscribedEvents()
  2. 3.x src/EventSubscriber/RngRequestSubscriber.php \Drupal\rng\EventSubscriber\RngRequestSubscriber::getSubscribedEvents()

File

src/EventSubscriber/RngRequestSubscriber.php, line 96

Class

RngRequestSubscriber
Runs tasks for RNG related to the request.

Namespace

Drupal\rng\EventSubscriber

Code

public static function getSubscribedEvents() {

  // Should go before other subscribers start to write their caches. Notably
  // before \Drupal\Core\EventSubscriber\KernelDestructionSubscriber to
  // prevent instantiation of destructed services.
  $events[KernelEvents::TERMINATE][] = [
    'onKernelTerminate',
    300,
  ];
  return $events;
}