You are here

public static function RouteSubscriber::getSubscribedEvents in Commerce Invoice 8.2

Overrides RouteSubscriberBase::getSubscribedEvents

File

src/EventSubscriber/RouteSubscriber.php, line 18

Class

RouteSubscriber
Re-Add the route requirement for the order invoices route.

Namespace

Drupal\commerce_invoice\EventSubscriber

Code

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;
}