public function runFindArticles(TBGRequest $request) { $this->articlename = $request['articlename']; if ($this->articlename) { list($this->resultcount, $this->articles) = TBGWikiArticle::findArticlesByContentAndProject($this->articlename, TBGContext::getCurrentProject(), 10); } }
public function listen_quicksearchDropdownFoundItems(TBGEvent $event) { $searchterm = $event->getSubject(); list($resultcount, $articles) = TBGWikiArticle::findArticlesByContentAndProject($searchterm, TBGContext::getCurrentProject()); TBGActionComponent::includeTemplate('publish/quicksearch_dropdown_founditems', array('searchterm' => $searchterm, 'articles' => $articles, 'resultcount' => $resultcount)); }