Sonata\OrderBundle\Controller\Api\OrderController::getOrder PHP Method

getOrder() protected method

Retrieves order with id $id or throws an exception if it doesn't exist.
protected getOrder ( $id ) : Sonata\Component\Order\OrderInterface
$id
return Sonata\Component\Order\OrderInterface
    protected function getOrder($id)
    {
        $order = $this->orderManager->findOneBy(array('id' => $id));
        if (null === $order) {
            throw new NotFoundHttpException(sprintf('Order (%d) not found', $id));
        }
        return $order;
    }