function PathRootsSubscriber::getSubscribedEvents

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php \Drupal\Core\EventSubscriber\PathRootsSubscriber::getSubscribedEvents()
  2. 8.9.x core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php \Drupal\Core\EventSubscriber\PathRootsSubscriber::getSubscribedEvents()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php \Drupal\Core\EventSubscriber\PathRootsSubscriber::getSubscribedEvents()

File

core/lib/Drupal/Core/EventSubscriber/PathRootsSubscriber.php, line 67

Class

PathRootsSubscriber
Provides all available first bits of all route paths.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() : array {
  $events = [];
  // Try to set a low priority to ensure that all routes are already added.
  $events[RoutingEvents::ALTER][] = [
    'onRouteAlter',
    -1024,
  ];
  $events[RoutingEvents::FINISHED][] = [
    'onRouteFinished',
  ];
  return $events;
}

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