You are here

public function RouteSubscriber::alterRoutes in Module Filter 8

Same name and namespace in other branches
  1. 8.3 src/Routing/RouteSubscriber.php \Drupal\module_filter\Routing\RouteSubscriber::alterRoutes()

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 21
Contains \Drupal\module_filter\Routing\RouteSubscriber.

Class

RouteSubscriber
Listens to the dynamic route events.

Namespace

Drupal\module_filter\Routing

Code

public function alterRoutes(RouteCollection $collection) {
  if ($route = $collection
    ->get('update.status')) {
    $route
      ->setDefault('_controller', 'Drupal\\module_filter\\Controller\\ModuleFilterUpdateController::updateStatus');
  }
}