You are here

protected function RouteSubscriber::alterRoutes in Google Analytics Reports 8.3

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
Subscriber for google analytics reports routes.

Namespace

Drupal\google_analytics_reports\Routing

Code

protected function alterRoutes(RouteCollection $collection) {
  if ($route = $collection
    ->get('google_analytics_reports_api.settings')) {
    $route
      ->setDefault('_form', 'Drupal\\google_analytics_reports\\Form\\GoogleAnalyticsReportsAdminSettingsForm');
  }
}