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

Breadcrumb

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

class RoutingEvents

Contains all events thrown in the core routing component.

Hierarchy

  • class \Drupal\Core\Routing\RoutingEvents

Expanded class hierarchy of RoutingEvents

21 files declare their use of RoutingEvents
AccessRouteAlterSubscriber.php in core/modules/system/src/EventSubscriber/AccessRouteAlterSubscriber.php
AdminRouteSubscriber.php in core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php
CacheRouterRebuildSubscriber.php in core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php
ContentModerationRouteSubscriber.php in core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php
ContentTranslationRouteSubscriber.php in core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php

... See full list

File

core/lib/Drupal/Core/Routing/RoutingEvents.php, line 8

Namespace

Drupal\Core\Routing
View source
final class RoutingEvents {
    
    /**
     * Name of the event fired during route collection to allow new routes.
     *
     * This event is used to add new routes based upon existing routes, giving
     * modules the opportunity to dynamically generate additional routes. The
     * event listener method receives a \Drupal\Core\Routing\RouteBuildEvent
     * instance.
     *
     * @Event
     *
     * @see \Drupal\Core\Routing\RouteBuildEvent
     * @see \Drupal\Core\EventSubscriber\EntityRouteProviderSubscriber
     * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
     *
     * @var string
     */
    const DYNAMIC = 'routing.route_dynamic';
    
    /**
     * Name of the event fired during route collection to allow changes to routes.
     *
     * This event is used to process new routes before they get saved, giving
     * modules the opportunity to alter routes provided by any other module. The
     * event listener method receives a \Drupal\Core\Routing\RouteBuildEvent
     * instance.
     *
     * @Event
     *
     * @see \Symfony\Component\Routing\RouteCollection
     * @see \Drupal\system\EventSubscriber\AdminRouteSubscriber
     * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
     *
     * @var string
     */
    const ALTER = 'routing.route_alter';
    
    /**
     * Name of the event fired to indicate route building has ended.
     *
     * This event gives modules the opportunity to perform some action after route
     * building has completed. The event listener receives a
     * \Drupal\Component\EventDispatcher\Event instance.
     *
     * @Event
     *
     * @see \Drupal\Component\EventDispatcher\Event
     * @see \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber
     * @see \Drupal\Core\Routing\RouteBuilder::rebuild()
     *
     * @var string
     */
    const FINISHED = 'routing.route_finished';

}

Members

Title Sort descending Modifiers Object type Summary
RoutingEvents::ALTER constant Name of the event fired during route collection to allow changes to routes.
RoutingEvents::DYNAMIC constant Name of the event fired during route collection to allow new routes.
RoutingEvents::FINISHED constant Name of the event fired to indicate route building has ended.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal