/** * @Route("/indicador/datos/public/{id}/{dimension}/{token}/{sala}", name="indicador_datos_public", options={"expose"=true}) */ public function getDatosPublic(FichaTecnica $fichaTec, $dimension, $token, $sala) { $em = $this->getDoctrine()->getManager(); if ($fichaTec) { if ($fichaTec->getEsPublico()) { return $this->getDatos($fichaTec, $dimension); } else { settype($sala, "integer"); $sa = $em->getRepository('IndicadoresBundle:Boletin')->getRuta($sala, $token); if (!$sa && $sala != "" && $token != "") { $sa = $em->getRepository('IndicadoresBundle:Social')->getRuta($sala, $token); } if ($sa) { if ($sa != "Error") { return $this->getDatos($fichaTec, $dimension); } else { //return $this->redirect($this->generateUrl('_inicio')); return new Response(); } } else { //return $this->redirect($this->generateUrl('_inicio')); return new Response(); } } } }