public function listAction(Request $request)
 {
     $em = $this->getDoctrine()->getManager();
     $url = $this->generateUrl('project_back_' . self::NOMBRE_RUTA . '_list');
     $data = new Bookies();
     $form = $this->createForm(self::NOMBRE_RUTA . '_filtro', $data);
     if ($this->getRequest()->isMethod('POST')) {
         $form->bind($this->getRequest());
         if ($form->isValid()) {
             $filtro = new Filtro(self::NOMBRE_CLASE, $em);
             $filtro->setDQLInicial();
             $filtro->setDataTexto('nombre', $data->getNombre());
             $filtro->setDataTexto('url', $data->getUrl());
             $filtro->setDataBoolean('patrocinador', $data->getPatrocinador());
             $filtro->setDataBoolean('licenciaEsp', $data->getLicenciaEsp());
             $filtro->setOrder();
             $filtro->setQuery();
             $filtro->setParametroTexto('nombre', $data->getNombre());
             $filtro->setParametroTexto('url', $data->getUrl());
             $filtro->setParametroBoolean('patrocinador', $data->getPatrocinador());
             $filtro->setParametroBoolean('licenciaEsp', $data->getLicenciaEsp());
             $query = $filtro->getQuery();
         }
     } else {
         $dql = "SELECT o FROM ProjectUserBundle:" . self::NOMBRE_CLASE . " o order by o.id DESC ";
         $query = $em->createQuery($dql);
     }
     $paginator = $this->get('knp_paginator');
     $pagination = $paginator->paginate($query, $this->getRequest()->query->get('page', 1), 30);
     $array = array('pagination' => $pagination, 'url' => $url);
     $array['nombreClase'] = self::NOMBRE_CLASE;
     $array['nombreRuta'] = self::NOMBRE_RUTA;
     $array['form'] = $form->createView();
     return $this->render('ProjectBackBundle:' . self::NOMBRE_CLASE . ':list.html.twig', $array);
 }
 public function listAction(Request $request)
 {
     $em = $this->getDoctrine()->getManager();
     $url = $this->generateUrl('project_back_' . self::NOMBRE_RUTA . '_list');
     if ($this->getRequest()->isMethod('POST')) {
         $form->bind($this->getRequest());
         if ($form->isValid()) {
             $filtro = new Filtro(self::NOMBRE_CLASE, $em);
             $filtro->setDQLInicial();
             $filtro->setDataTexto('trackSite', $data->getTrackSite());
             $filtro->setDataBoolean('bookie', $data->getBookie());
             $filtro->setOrder();
             $filtro->setQuery();
             $filtro->setParametroTexto('trackSite', $data->getTrackSite());
             $filtro->setParametroBoolean('bookie', $data->getBookie());
             $query = $filtro->getQuery();
         }
     }
     /*else {
     			$dql = "SELECT o FROM ProjectUserBundle:".self::NOMBRE_CLASE." o  ";
     			$query = $em -> createQuery($dql);
     		}
     
     		$paginator = $this -> get('knp_paginator');
     		$pagination = $paginator-> paginate($query, $this-> getRequest()-> query-> get('page', 1), 30);*/
     $pagination = array('getTotalItemCount' => 0);
     $array = array('pagination' => $pagination, 'url' => $url);
     $array['nombreClase'] = self::NOMBRE_CLASE;
     $array['nombreRuta'] = self::NOMBRE_RUTA;
     return $this->render('ProjectBackBundle:' . self::NOMBRE_CLASE . ':list.html.twig', $array);
 }
 public function listAction(Request $request)
 {
     $em = $this->getDoctrine()->getManager();
     $url = $this->generateUrl('project_back_' . self::NOMBRE_RUTA . '_list');
     $data = new AccountBookie();
     $form = $this->createForm(self::NOMBRE_RUTA . '_filtro', $data);
     if ($this->getRequest()->isMethod('POST')) {
         $form->bind($this->getRequest());
         if ($form->isValid()) {
             $filtro = new Filtro(self::NOMBRE_CLASE, $em);
             $filtro->setDQLInicial();
             $filtro->setDataInteger('userId', $data->getUserId());
             $filtro->setDataInteger('bookie', $data->getBookie());
             $filtro->setDataTexto('account', $data->getAccount());
             //	$filtro->setDataBoolean('depositado',$data -> getDepositado());
             //	$filtro->setDataBoolean('dineroActual',$data -> getDineroActual());
             //	$filtro->setDataBoolean('bono',$data -> getBono());
             //	$filtro->setDataTexto('rollover',$data -> getRollover());
             //	$filtro->setDataBoolean('cantidadBono',$data -> getCantidadBono());
             //	$filtro->setDataBoolean('ganancias',$data -> getGanancias());
             $filtro->setOrder();
             $filtro->setQuery();
             $filtro->setParametroInteger('userId', $data->getUserId());
             $filtro->setParametroInteger('bookie', $data->getBookie());
             $filtro->setParametroTexto('account', $data->getAccount());
             //	$filtro->setParametroBoolean('depositado',$data -> getDepositado());
             //	$filtro->setParametroBoolean('dineroActual',$data -> getDineroActual());
             //	$filtro->setParametroBoolean('bono',$data -> getBono());
             //	$filtro->setParametroTexto('rollover',$data -> getRollover());
             //	$filtro->setParametroBoolean('cantidadBono',$data -> getCantidadBono());
             //	$filtro->setParametroBoolean('ganancias',$data -> getGanancias());
             $query = $filtro->getQuery();
         }
     } else {
         $dql = "SELECT o FROM ProjectUserBundle:" . self::NOMBRE_CLASE . " o  ";
         $query = $em->createQuery($dql);
     }
     $paginator = $this->get('knp_paginator');
     $pagination = $paginator->paginate($query, $this->getRequest()->query->get('page', 1), 30);
     $array = array('pagination' => $pagination, 'url' => $url);
     $array['nombreClase'] = self::NOMBRE_CLASE;
     $array['nombreRuta'] = self::NOMBRE_RUTA;
     $array['form'] = $form->createView();
     $array['usuarios'] = self::extraerUsuarios($em);
     $array['bookies'] = self::extraerBookies($em);
     return $this->render('ProjectBackBundle:' . self::NOMBRE_CLASE . ':list.html.twig', $array);
 }