You are here

class RouteSubscriber in Media: Acquia DAM 8

Listens to the dynamic route events.

Hierarchy

  • class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of RouteSubscriber

1 string reference to 'RouteSubscriber'
media_acquiadam_report.services.yml in modules/media_acquiadam_report/media_acquiadam_report.services.yml
modules/media_acquiadam_report/media_acquiadam_report.services.yml
1 service uses RouteSubscriber
media_acquiadam_report.route_subscriber in modules/media_acquiadam_report/media_acquiadam_report.services.yml
Drupal\media_acquiadam_report\Routing\RouteSubscriber

File

modules/media_acquiadam_report/src/Routing/RouteSubscriber.php, line 11

Namespace

Drupal\media_acquiadam_report\Routing
View source
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  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);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RouteSubscriber::alterRoutes protected function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes
RouteSubscriberBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. 5
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1