Ejemplo n.º 1
0
 public function executeSearch($request)
 {
     $this->search_form = new SearchReportForm();
     if ($request->isMethod('get')) {
         return;
     }
     $this->search_form->bind($request->getParameter('searchreport'));
     if (!$this->search_form->isValid()) {
         return;
     }
     if ($this->getUser()->isAuthenticated()) {
         $this->pager = ReportPeer::search($this->search_form->getValue('query'), $this->getUser()->getGuardUser()->getId(), $this->search_form->getValue('source'), $this->search_form->getValue('page', 1), 10);
     } else {
         $this->pager = ReportPeer::search($this->search_form->getValue('query'), null, null, $this->search_form->getValue('page', 1), 10);
     }
 }