You are here

protected function RouteSubscriber::alterRoutes in Media: Acquia DAM 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/media_acquiadam_report/src/Routing/RouteSubscriber.php, line 16

Class

RouteSubscriber
Listens to the dynamic route events.

Namespace

Drupal\media_acquiadam_report\Routing

Code

protected function alterRoutes(RouteCollection $collection) {

  // Display asset listing as an admin page.
  if ($route = $collection
    ->get('view.acquia_dam_reporting.asset_report')) {
    $route
      ->setOption('_admin_route', TRUE);
  }
}