You are here

public function FacetapiUrlProcessor::setParams in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 plugins/facetapi/url_processor.inc \FacetapiUrlProcessor::setParams()
  2. 7 plugins/facetapi/url_processor.inc \FacetapiUrlProcessor::setParams()

Sets the parameters.

Parameters

array $params: An array of normalized params.

string $filter_key: The array key in $params corresponding to filters.

Return value

FacetapiUrlParser An instance of this class.

File

plugins/facetapi/url_processor.inc, line 112
Adapter and standard plugin class.

Class

FacetapiUrlProcessor

Code

public function setParams(array $params, $filter_key = 'f') {
  $this->params = $params;
  $this->filterKey = $filter_key;
  if (!isset($this->params[$this->filterKey]) || !is_array($this->params[$this->filterKey])) {
    $this->params[$this->filterKey] = array();
  }
  return $this;
}