public viewAction ( integer $id, boolean $thanks ) : |
||
$id | integer | Order id |
$thanks | boolean | Thanks |
리턴 | 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]);
}