src/FoodAirwaySiteBundle/Controller/ProductController.php line 32

Open in your IDE?
  1. <?php
  2. namespace FoodAirwaySiteBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Symfony\Component\HttpFoundation\Session\Session;
  6. class ProductController extends BaseController
  7. {
  8.     public function listingAction(Request $request)
  9.     {
  10.         $dataService $this->get('FoodAirwayApiBundle\Services\DataService');
  11.         $cartService $this->get('FoodAirwaySiteBundle\Services\CartService');
  12.         $orderService $this->get('FoodAirwayApiBundle\Services\OrderService');
  13.         $products $dataService->productListingByCategoriesWithTimings();
  14.         $foodTypes $dataService->fetchFoodTypes();
  15.         $cart $cartService->getSessionCart();
  16.         $isDeliveryingNow $orderService->isDeliveryingNow();
  17.         $response =  
  18.             $this->render('@FoodAirwaySite/Product/listing.html.twig'
  19.                 array('products'=>$products'cart'=>$cart'active'=>'product','foodTypes'=>$foodTypes'isDeliveryingNow'=>$isDeliveryingNow)
  20.             );
  21.         return $this->etagResponse($response$request);
  22.     }
  23.     public function offerAction()
  24.     {
  25.         return $this->render('@FoodAirwaySite/Product/offers.html.twig');
  26.     }
  27. }