You are here

public function CartEmptyEvent::__construct in Commerce Core 8.2

Constructs a new CartEmptyEvent.

Parameters

\Drupal\commerce_order\Entity\OrderInterface $cart: The cart order.

\Drupal\commerce_order\Entity\OrderItemInterface[] $order_items: The removed order items.

File

modules/cart/src/Event/CartEmptyEvent.php, line 37

Class

CartEmptyEvent
Defines the cart empty event.

Namespace

Drupal\commerce_cart\Event

Code

public function __construct(OrderInterface $cart, array $order_items) {
  $this->cart = $cart;
  $this->orderItems = $order_items;
}