You are here

public function RouteSubscriber::onDynamicRouteEvent in Drupal 8

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());
}