public static function CartTokenSubscriber::getSubscribedEvents in Commerce Cart API 8
File
- src/
EventSubscriber/ CartTokenSubscriber.php, line 58
Class
- CartTokenSubscriber
- Cart token subscriber.
Namespace
Drupal\commerce_cart_api\EventSubscriberCode
public static function getSubscribedEvents() {
$events = [];
// Run before router_listener so we execute before access checks, and before
// dynamic_page_cache so we can populate a session. The ensures proper
// access to CheckoutController.
$events[KernelEvents::REQUEST][] = [
'onRequest',
100,
];
$events[KernelEvents::RESPONSE][] = [
'onResponse',
];
return $events;
}