public function emptyLines(CartInterface $cart)
    {
        $cart
            ->getCartLines()
            ->map(function (CartLineInterface $cartLine) use ($cart) {

                $this->silentRemoveLine($cart, $cartLine);
            });

        $this
            ->cartEventDispatcher
            ->dispatchCartOnEmptyEvent($cart);

        $this
            ->cartEventDispatcher
            ->dispatchCartLoadEvents($cart);

        return $this;
    }
public function emptyLines(CartInterface $cart)
    {
        $cart
            ->getCartLines()
            ->map(function (CartLineInterface $cartLine) use ($cart) {

                $this->silentRemoveLine($cart, $cartLine);
            });

        $this
            ->cartEventDispatcher
            ->dispatchCartOnEmptyEvent($cart);

        $this
            ->cartEventDispatcher
            ->dispatchCartLoadEvents($cart);

        return $this;
    }
public function emptyLines ( CartInterface $ cart ) { $ cart -> getCartLines ( ) -> map ( function ( CartLineInterface $ cartLine ) use ( $ cart ) { $ this -> silentRemoveLine ( $ cart , $ cartLine ) ; } ) ; $ this -> cartEventDispatcher -> dispatchCartOnEmptyEvent ( $ cart ) ; $ this -> cartEventDispatcher -> dispatchCartLoadEvents ( $ cart ) ; return $ this ; }
Empty cart.

This method dispatches all Cart Load events

@param CartInterface $cart Cart

@return $this Self object
Empty cart .