protected function getOrder(ConsumerEvent $event)
    {
        $orderId = $event->getMessage()->getValue('order_id');

        $order = $this->orderManager->getOrder($orderId);

        if (!$order) {
            throw new \RuntimeException(sprintf('Unable to retrieve Order %d', $orderId));
        }

        return $order;
    }
protected function getOrder(ConsumerEvent $event)
    {
        $orderId = $event->getMessage()->getValue('order_id');

        $order = $this->orderManager->getOrder($orderId);

        if (!$order) {
            throw new \RuntimeException(sprintf('Unable to retrieve Order %d', $orderId));
        }

        return $order;
    }
protected function getOrder ( ConsumerEvent $ event ) { $ orderId = $ event -> getMessage ( ) -> getValue ( 'order_id' ) ; $ order = $ this -> orderManager -> getOrder ( $ orderId ) ; if ( ! $ order ) { throw new \ RuntimeException ( sprintf ( 'Unable to retrieve Order %d' , $ orderId ) ) ; } return $ order ; }
Get the related Order.

@param ConsumerEvent $event

@throws \RuntimeException

@return OrderInterface
Get the related Order .