Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PathRootsSubscriber.php

function PathRootsSubscriber::getSubscribedEvents

Overrides EventSubscriberInterface::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;
}
RSS feed
Powered by Drupal