public function dispatchOrderOnCreatedEvent(
        CartInterface $cart,
        OrderInterface $order
    ) {
        $orderPreCreatedEvent = new OrderOnCreatedEvent($cart, $order);
        $this->eventDispatcher->dispatch(
            ElcodiCartEvents::ORDER_ONCREATED,
            $orderPreCreatedEvent
        );

        return $this;
    }
public function dispatchOrderOnCreatedEvent(
        CartInterface $cart,
        OrderInterface $order
    ) {
        $orderPreCreatedEvent = new OrderOnCreatedEvent($cart, $order);
        $this->eventDispatcher->dispatch(
            ElcodiCartEvents::ORDER_ONCREATED,
            $orderPreCreatedEvent
        );

        return $this;
    }
public function dispatchOrderOnCreatedEvent ( CartInterface $ cart , OrderInterface $ order ) { $ orderPreCreatedEvent = new OrderOnCreatedEvent ( $ cart , $ order ) ; $ this -> eventDispatcher -> dispatch ( ElcodiCartEvents :: ORDER_ONCREATED , $ orderPreCreatedEvent ) ; return $ this ; }
Event dispatched when a Cart is being converted to an Order.

@param CartInterface  $cart  Cart
@param OrderInterface $order Order

@return $this Self object
Event dispatched when a Cart is being converted to an Order .