You are here

public function FacetapiUrlProcessor::setParams in Facet API 7

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

Sets the normalized parameters.

This method is usually called by FacetapiAdapter::setParams() and is very rarely called directly.

Parameters

array $params: An array of normalized params hat have already been passed through FacetapiUrlProcessor::normalizeParams().

string $filter_key: The array key in $params containing the facet data, defaults to "f".

Return value

FacetapiUrlParser An instance of this class.

File

plugins/facetapi/url_processor.inc, line 146
Base url processor plugin class.

Class

FacetapiUrlProcessor
Abstract class extended by url processor plugins.

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;
}