class RouteSubscriber in Media: Acquia DAM 8
Listens to the dynamic route events.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\media_acquiadam_report\Routing\RouteSubscriber
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\RoutingView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |
|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |