/** * @Route("/tour/detail/id/{id}", name="web_tour_detail") * @Method("GET") */ public function detailTourAction($id, Request $request) { $datos = $this->getParamsTour($request); $tour = $this->getDoctrine()->getRepository('VisitaYucatanBundle:Tour')->getTourById($id, $datos[Generalkeys::NUMBER_ZERO], $datos[Generalkeys::NUMBER_ONE]); $imagesTour = $this->getDoctrine()->getRepository('VisitaYucatanBundle:Tourimagen')->findTourImagesByIdTour($id); return $this->render('VisitaYucatanBundle:web/pages:detalle-tour.html.twig', array('tour' => TourUtils::getTourTO($tour, $imagesTour), 'claseImg' => Generalkeys::CLASS_HEADER_TOUR_DETAIL, 'fechaReserva' => DateUtil::formatDateToString(DateUtil::summDayToDate(DateUtil::Now(), Generalkeys::NUMBER_TWO)))); }
/** * @Route("/hotel/detail/id/{id}", name="web_hotel_detail") * @Method("GET") */ public function detailHotelAction($id, Request $request) { $datos = $this->getParamsTour($request); $hotel = $this->getDoctrine()->getRepository('VisitaYucatanBundle:Hotel')->getHotelById($id, $datos[Generalkeys::NUMBER_ZERO], $datos[Generalkeys::NUMBER_ONE]); $images = $this->getDoctrine()->getRepository('VisitaYucatanBundle:Hotelimagen')->findHotelImagesByIdHotel($id); $idContract = $this->getDoctrine()->getRepository('VisitaYucatanBundle:HotelContrato')->findIdContractActiveByHotel($id); if ($idContract == "") { $idContract = Generalkeys::NUMBER_ZERO; } $planAlimentos = $this->getDoctrine()->getRepository('VisitaYucatanBundle:HotelContrato')->findPlanAlimentosByContract($idContract); $edadMenor = $this->getDoctrine()->getRepository('VisitaYucatanBundle:HotelContrato')->findAgeMinorByContract($idContract); if ($edadMenor == "") { $edadMenor = Generalkeys::NUMBER_ZERO; } return $this->render('VisitaYucatanBundle:web/pages:detalle-hotel.html.twig', array('hotel' => HotelUtils::getDetailHotel($hotel, $images), 'dateFrom' => DateUtil::formatDateToString(DateUtil::summDayToDate(DateUtil::Now(), Generalkeys::NUMBER_ZERO)), 'dateTo' => DateUtil::formatDateToString(DateUtil::summDayToDate(DateUtil::Now(), Generalkeys::NUMBER_ONE)), 'ageMinor' => $edadMenor, 'planAlimentos' => $planAlimentos)); }