diff --git a/app/modules/Front/Search/SearchPresenter.php b/app/modules/Front/Search/SearchPresenter.php new file mode 100644 index 0000000..3a38a06 --- /dev/null +++ b/app/modules/Front/Search/SearchPresenter.php @@ -0,0 +1,66 @@ +em->getTranslationRepository()->find($translation); + + if ($term) $this->term = $term; + if ($translation) $this->translation = $translation; + // $this->slug = $this->translations[$translation]["slug"]; + + $this->termFacade->setDirection(1); + +/* if ($paginate) { + $this["paginator"]->setItemCount(500); + $offset = $this["paginator"]->getOffset(); + $itemsPerPage = $this['paginator']->getItemsPerPage(); + } +*/ + $q = $this->termFacade->findByString($term, $t->dictionary, $clen); + //$q->setMaxResults(500)->setFirstResult($offset)->getMaxResults($itemsPerPage); + + $this->template->translation = $t; + + return $q->getResult(); + } + + public function renderDefault($translation,$term,$clen,$paginate = false) + { + $this['searchForm']['string']->setValue($this->term); + $this->template->result = $this->doSearch('TermQuery',$translation,$term,$clen,$paginate); + } + + +} + +?> \ No newline at end of file