コード例 #1
0
 public function searchAction()
 {
     parent::initFrontEnd();
     $rep_cat = $this->getDoctrine()->getManager()->getRepository('WellnessCoreBundle:CategoryService');
     $ListCategories = $rep_cat->findBy(array('name' => $_REQUEST['searchFields']));
     return $this->render('WellnessCoreBundle:FrontEnd/Category:search.html.twig', array('listCategory' => $ListCategories, 'listImagesSlider' => $this->getListImageSlider()));
 }
コード例 #2
0
 public function searchAction()
 {
     parent::initFrontEnd();
     $rep_provider = $this->getDoctrine()->getManager()->getRepository('WellnessCoreBundle:Provider');
     dump($_REQUEST['searchCategory']);
     $ListProvider = $rep_provider->SearchProvider($_REQUEST['searchName'], $_REQUEST['searchCategory'], $_REQUEST['searchLocality']);
     return $this->render('WellnessCoreBundle:FrontEnd/Provider:search.html.twig', array('listProvider' => $ListProvider, 'listImagesSlider' => $this->getListImageSlider()));
 }
コード例 #3
0
 public function showAction(Promotion $promotion)
 {
     parent::initFrontEnd();
     $CurrentPromotion = $this->getDoctrine()->getEntityManager()->getRepository('WellnessCoreBundle:Promotion')->findOneBy(array('id' => $promotion->getId()));
     if ($CurrentPromotion == null) {
         throw $this->createNotFoundException("Pas de promotion trouvée !");
     }
     return $this->render('WellnessCoreBundle:FrontEnd/Promotion:show.html.twig', array('listCategoryWithLogo' => $this->getListCategoryWithLogo(), 'listImagesSlider' => $this->getListImageSlider(), 'CurrentPromotion' => $CurrentPromotion));
 }
コード例 #4
0
 public function showAction(Training $training)
 {
     parent::initFrontEnd();
     $CurrentTraining = $this->getDoctrine()->getEntityManager()->getRepository('WellnessCoreBundle:Training')->findOneBy(array('id' => $training->getId()));
     if ($CurrentTraining == null) {
         throw $this->createNotFoundException("Pas de stage trouvé !");
     }
     return $this->render('WellnessCoreBundle:FrontEnd/Training:show.html.twig', array('listCategoryWithLogo' => $this->getListCategoryWithLogo(), 'listImagesSlider' => $this->getListImageSlider(), 'CurrentTraining' => $CurrentTraining));
 }
コード例 #5
0
 /**
  * Finds and displays a News entity.
  *
  */
 public function showAction(News $news)
 {
     parent::initFrontEnd();
     $em = $this->getDoctrine()->getManager();
     $CurrentNews = $em->getRepository('WellnessCoreBundle:News')->find($news->getId());
     if (!$CurrentNews) {
         throw $this->createNotFoundException('Unable to find News entity.');
     }
     return $this->render('WellnessCoreBundle:FrontEnd/News:show.html.twig', array('listImagesSlider' => $this->getListImageSlider(), 'listCategoryWithLogo' => $this->getListCategoryWithLogo(), 'CurrentNews' => $CurrentNews));
 }
コード例 #6
0
 public function indexAction()
 {
     parent::initFrontEnd();
     $rep_img = $this->getDoctrine()->getManager()->getRepository('WellnessCoreBundle:Image');
     $repo_service = $this->getDoctrine()->getEntityManager()->getRepository('WellnessCoreBundle:CategoryService');
     $monthService = $repo_service->findOneBy(array("forward" => "1"));
     $imgMonthService = $rep_img->findOneBy(array('categoryService' => $monthService->getId()));
     $listLastNews = $this->getDoctrine()->getEntityManager()->getRepository('WellnessCoreBundle:News')->getListNews(2);
     $listLastTraining = $this->getDoctrine()->getEntityManager()->getRepository('WellnessCoreBundle:Training')->getLastListTrainings(4);
     $listLastPromotions = $this->getDoctrine()->getEntityManager()->getRepository('WellnessCoreBundle:Promotion')->getLastListPromotions(4);
     if ($monthService == null) {
         throw $this->createNotFoundException("Pas de service du mois trouvé !");
     }
     if ($imgMonthService == null) {
         throw $this->createNotFoundException("Pas de service du mois trouvé !");
     }
     if ($listLastNews == null) {
         throw $this->createNotFoundException("Pas de news trouvée !");
     }
     return $this->render('WellnessCoreBundle:FrontEnd/Home:index.html.twig', array('listCategoryWithLogo' => $this->getListCategoryWithLogo(), 'listImagesSlider' => $this->getListImageSlider(), 'listProvidersWithLogo' => $this->getListProviderWithLogo(), 'imgMonthService' => $imgMonthService, 'monthService' => $monthService, 'listLastNews' => $listLastNews, 'listLastTraining' => $listLastTraining, 'listLastPromotions' => $listLastPromotions));
 }