public function CartEventSubscriber::displayAddToCartMessage in Commerce Cart Flyout 8
Displays an add to cart message.
Parameters
\Drupal\commerce_cart\Event\CartEntityAddEvent $event: The add to cart event.
Overrides CartEventSubscriber::displayAddToCartMessage
File
- src/
EventSubscriber/ CartEventSubscriber.php, line 43
Class
- CartEventSubscriber
- Replaces the original CartEventSubscriber from commerce_cart module.
Namespace
Drupal\commerce_cart_flyout\EventSubscriberCode
public function displayAddToCartMessage(CartEntityAddEvent $event) {
if (!$this->routeMatch
->getRouteObject()
->hasRequirement('_cart_api')) {
parent::displayAddToCartMessage($event);
}
}