public function detalle($id)
 {
     Session::tienePermiso('detalle');
     $entidad = EntidadReceptora::getById($id);
     $n = NecesidadEntidad::getById($entidad->getNecesidad_entidad_id());
     $e = EstadoEntidad::getById($entidad->getEstado_entidad_id());
     $s = ServicioPrestado::getById($entidad->getServicio_prestado_id());
     $elementos['necesidad'] = $n->getDescripcion();
     $elementos['estado'] = $e->getDescripcion();
     $elementos['servicio'] = $s->getDescripcion();
     if ($entidad->getId() != null) {
         $this->view->renderizar("detalle", array("entidad" => $entidad, "elementos" => $elementos));
     } else {
         $this->redireccionar('entidad/listado');
     }
 }
 public function detalle($id)
 {
     Session::tienePermiso('detalle');
     $estado = EstadoEntidad::getById($id);
     if ($estado->getId() != null) {
         $this->view->renderizar("detalle", array("estado" => $estado));
     } else {
         $this->redireccionar('estado/listado');
     }
 }