You are here

protected function RouteSubscriber::alterRoutes in Configuration Synchronizer 8.2

Alters existing routes for a specific collection.

Parameters

\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.

Overrides RouteSubscriberBase::alterRoutes

File

src/Routing/RouteSubscriber.php, line 16

Class

RouteSubscriber
Listens to the dynamic route events.

Namespace

Drupal\config_sync\Routing

Code

protected function alterRoutes(RouteCollection $collection) {

  // Use our form for distribution imports.
  if ($route = $collection
    ->get('config_distro.import')) {
    $route
      ->setDefault('_form', '\\Drupal\\config_sync\\Form\\ConfigSyncImportForm');
  }
}