You are here

public static function CacheRouterRebuildSubscriber::getSubscribedEvents in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php \Drupal\Core\EventSubscriber\CacheRouterRebuildSubscriber::getSubscribedEvents()
  2. 9 core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php \Drupal\Core\EventSubscriber\CacheRouterRebuildSubscriber::getSubscribedEvents()

File

core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php, line 26

Class

CacheRouterRebuildSubscriber
Clear cache tags when the router is rebuilt.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() : array {
  $events = [];

  // Act only when the router rebuild is finished.
  $events[RoutingEvents::FINISHED][] = [
    'onRouterFinished',
    200,
  ];
  return $events;
}