public function eshopDetailAction(Request $request)
 {
     /** @var Eshop $eshop */
     $eshop = $this->eshopRepository->findOne([EshopMeta::SLUG => $request->attributes->get("eshop")]);
     $category = null;
     if ($request->attributes->has("category")) {
         /** @var Category $category */
         $category = $this->categoryRepository->findOneById($request->attributes->get("category"));
     }
     return $this->render("CC15Bundle:Eshop:eshopDetail.html.twig", ["eshop" => $eshop, "category" => $category, "categories" => $this->categoryRepository->findCategories($eshop, $category), "products" => $this->listingService->findProducts(ListingFilter::create()->setEshop($eshop)->setCategory($category))]);
 }
 public function homepageAction()
 {
     return $this->render("CC15Bundle:Homepage:homepage.html.twig", ["eshops" => $this->eshopRepository->findEshopsForHomepage(), "products" => $this->listingService->findProducts(ListingFilter::create())]);
 }
 public function searchAction(Request $request)
 {
     $q = $request->query->get("q");
     return $this->render("CC15Bundle:Search:search.html.twig", ["q" => $q, "products" => $this->listingService->findProducts(ListingFilter::create()->setQ($q))]);
 }