3 namespace Drupal\Core\Routing;
6 * Contains all events thrown in the core routing component.
8 final class RoutingEvents {
11 * Name of the event fired during route collection to allow new routes.
13 * This event is used to add new routes based upon existing routes, giving
14 * modules the opportunity to dynamically generate additional routes. The
15 * event listener method receives a \Drupal\Core\Routing\RouteBuildEvent
20 * @see \Drupal\Core\Routing\RouteBuildEvent
21 * @see \Drupal\Core\EventSubscriber\EntityRouteProviderSubscriber
22 * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
26 const DYNAMIC = 'routing.route_dynamic';
29 * Name of the event fired during route collection to allow changes to routes.
31 * This event is used to process new routes before they get saved, giving
32 * modules the opportunity to alter routes provided by any other module. The
33 * event listener method receives a \Drupal\Core\Routing\RouteBuildEvent
38 * @see \Symfony\Component\Routing\RouteCollection
39 * @see \Drupal\system\EventSubscriber\AdminRouteSubscriber
40 * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
44 const ALTER = 'routing.route_alter';
47 * Name of the event fired to indicate route building has ended.
49 * This event gives modules the opportunity to perform some action after route
50 * building has completed. The event listener receives a
51 * \Symfony\Component\EventDispatcher\Event instance.
55 * @see \Symfony\Component\EventDispatcher\Event
56 * @see \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber
57 * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
61 const FINISHED = 'routing.route_finished';