/** * Sets the page title during index method. * @param Wikia\Search\Config $searchConfig */ protected function setPageTitle(Wikia\Search\Config $searchConfig) { if ($searchConfig->getQuery()->hasTerms()) { $this->wg->Out->setPageTitle(wfMsg('wikiasearch2-page-title-with-query', array(ucwords($searchConfig->getQuery()->getSanitizedQuery()), $this->wg->Sitename))); } else { if ($searchConfig->getInterWiki()) { $this->wg->Out->setPageTitle(wfMsg('wikiasearch2-page-title-no-query-interwiki')); } else { $this->wg->Out->setPageTitle(wfMsg('wikiasearch2-page-title-no-query-intrawiki', array($this->wg->Sitename))); } } }