コード例 #1
0
 /**
  * Return HTTP parameters to render the current page with a different set
  * of search terms.
  *
  * @param string $lookfor New search terms
  * @param bool   $escape  Should we escape the string for use in the view?
  *
  * @return string
  */
 public function setSearchTerms($lookfor, $escape = true)
 {
     // If we're currently dealing with an advanced query, turn it off so
     // that it can be overridden:
     if ($this->params->getSearchType() == 'advanced') {
         $savedSuppressQuery = $this->suppressQuery;
         $this->suppressQuery = true;
     }
     // Generate the URL:
     $new = $this->updateQueryString($this->basicSearchParam, $lookfor, null, $escape, true);
     // Restore settings to their previous state:
     if (isset($savedSuppressQuery)) {
         $this->suppressQuery = $savedSuppressQuery;
     }
     return $new;
 }
コード例 #2
0
ファイル: SearchTabs.php プロジェクト: bbeckman/NDL-VuFind2
 /**
  * Get the tab configuration
  *
  * @param \VuFind\Search\Base\Params $params Search parameters
  *
  * @return array
  */
 public function getTabConfigForParams($params)
 {
     return $this->getTabConfig($params->getSearchClassId(), $params->getDisplayQuery(), $params->getSearchHandler(), $params->getSearchType(), $params->getHiddenFilters());
 }