You are here

private function RenameAdminPathsEventSubscriber::alterRouteCollection in Rename Admin Paths 8.2

Parameters

RouteCollection $routeCollection:

string $from:

string $to:

1 call to RenameAdminPathsEventSubscriber::alterRouteCollection()
RenameAdminPathsEventSubscriber::onRoutesAlter in src/EventSubscriber/RenameAdminPathsEventSubscriber.php

File

src/EventSubscriber/RenameAdminPathsEventSubscriber.php, line 68

Class

RenameAdminPathsEventSubscriber

Namespace

Drupal\rename_admin_paths\EventSubscriber

Code

private function alterRouteCollection(RouteCollection $routeCollection, string $from, string $to) : void {
  foreach ($routeCollection as $route) {
    $this
      ->replaceRoutePath($route, $from, $to);
  }
}