public static function RouteSubscriber::getSubscribedEvents in Commerce Core 8.2
Overrides RouteSubscriberBase::getSubscribedEvents
File
- modules/
promotion/ src/ EventSubscriber/ RouteSubscriber.php, line 18
Class
- RouteSubscriber
- Provides a route subscriber that adding the _admin_route option to the routes like "promotion/%/coupons".
Namespace
Drupal\commerce_promotion\EventSubscriberCode
public static function getSubscribedEvents() {
$events = parent::getSubscribedEvents();
// Ensure to run after the Views route subscriber.
// @see \Drupal\views\EventSubscriber\RouteSubscriber.
$events[RoutingEvents::ALTER] = [
'onAlterRoutes',
-200,
];
return $events;
}