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

Breadcrumb

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

function RouteSubscriberBase::onAlterRoutes

Delegates the route altering to self::alterRoutes().

Parameters

\Drupal\Core\Routing\RouteBuildEvent $event: The route build event.

1 method overrides RouteSubscriberBase::onAlterRoutes()
SpecialAttributesRouteSubscriber::onAlterRoutes in core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php
Delegates the route altering to self::alterRoutes().

File

core/lib/Drupal/Core/Routing/RouteSubscriberBase.php, line 35

Class

RouteSubscriberBase
Provides a base implementation for RouteSubscriber.

Namespace

Drupal\Core\Routing

Code

public function onAlterRoutes(RouteBuildEvent $event) {
    $collection = $event->getRouteCollection();
    $this->alterRoutes($collection);
}

API Navigation

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