function RouteSubscriber::onDynamicRouteEvent

Provides routes on route rebuild time.

Parameters

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

File

core/modules/path/src/Routing/RouteSubscriber.php, line 21

Class

RouteSubscriber
Provides backwards-compatible routes for the path module.

Namespace

Drupal\path\Routing

Code

public function onDynamicRouteEvent(RouteBuildEvent $event) {
    $route_collection = $event->getRouteCollection();
    $route_collection->add('path.admin_add', new BcRoute());
    $route_collection->add('path.admin_edit', new BcRoute());
    $route_collection->add('path.delete', new BcRoute());
    $route_collection->add('path.admin_overview', new BcRoute());
    $route_collection->add('path.admin_overview_filter', new BcRoute());
}

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