You are here

public function RouteSubscriber::alterRoutes in Automatic IP ban (Autoban) 8

Alters existing routes for a specific collection.

Parameters

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

Overrides RouteSubscriberBase::alterRoutes

File

modules/autoban_dblog/src/Routing/RouteSubscriber.php, line 33
Contains \Drupal\autoban_dblog\Routing\RouteSubscriber.

Class

RouteSubscriber
Route alter.

Namespace

Drupal\autoban_dblog\Routing

Code

public function alterRoutes(RouteCollection $collection) {

  // Change controller for '/admin/reports/dblog'.
  if ($route = $collection
    ->get('dblog.overview')) {
    $route
      ->setDefault('_controller', '\\Drupal\\autoban_dblog\\Controller\\AutobanDbLogController::overview');
  }
}