Elcodi\Store\CartBundle\Controller\OrderController::viewAction PHP Метод

viewAction() публичный Метод

Order view
public viewAction ( integer $id, boolean $thanks ) : Response
$id integer Order id
$thanks boolean Thanks
Результат Symfony\Component\HttpFoundation\Response Response
    public function viewAction($id, $thanks)
    {
        $order = $this->get('elcodi.repository.order')->findOneBy(['id' => $id, 'customer' => $this->getUser()]);
        if (!$order instanceof OrderInterface) {
            throw $this->createNotFoundException('Order not found');
        }
        $orderCoupons = $this->get('elcodi.repository.order_coupon')->findOrderCouponsByOrder($order);
        return $this->renderTemplate('Pages:order-view.html.twig', ['order' => $order, 'orderCoupons' => $orderCoupons, 'thanks' => $thanks]);
    }