getStateEventName example

if ($orderDelivery === null) {
            throw OrderException::orderDeliveryNotFound($orderDeliveryId);
        }

        if ($orderDelivery->getOrder() === null) {
            throw OrderException::orderDeliveryNotFound($orderDeliveryId);
        }

        $context = $this->getContext($orderDelivery->getOrderId()$event->getContext());
        $order = $this->getOrder($orderDelivery->getOrderId()$context);

        $this->dispatchEvent($event->getStateEventName()$order$context);
    }

    /** * @throws OrderException */
    public function onOrderTransactionStateChange(StateMachineStateChangeEvent $event): void
    {
        $orderTransactionId = $event->getTransition()->getEntityId();

        $criteria = new Criteria([$orderTransactionId]);
        $criteria->addAssociation('paymentMethod');
        
Home | Imprint | This part of the site doesn't use cookies.