You are here

public function CartManagerInterface::emptyCart in Commerce Core 8.2

Empties the given cart order.

Parameters

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

bool $save_cart: Whether the cart should be saved after the operation.

1 method overrides CartManagerInterface::emptyCart()
CartManager::emptyCart in modules/cart/src/CartManager.php
Empties the given cart order.

File

modules/cart/src/CartManagerInterface.php, line 22

Class

CartManagerInterface
Manages the cart order and its order items.

Namespace

Drupal\commerce_cart

Code

public function emptyCart(OrderInterface $cart, $save_cart = TRUE);