You are here

public function FacetapiAdapter::setParams in Facet API 6.3

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

Processes a raw array of active filters.

Parameters

array $params: An array of keyed params, such as $_GET.

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

Return value

FacetapiAdapter An instance of this class.

1 call to FacetapiAdapter::setParams()
FacetapiAdapter::__construct in plugins/facetapi/adapter.inc
Constructor, sets searcher and type of content being indexed.

File

plugins/facetapi/adapter.inc, line 180
Adapter plugin and adapter related calsses.

Class

FacetapiAdapter
Abstract class extended by search backends that retrieves facet information from the database.

Code

public function setParams(array $params = array(), $filter_key = 'f') {
  $this->facets = array();
  $normalized = $this->urlProcessor
    ->normalizeParams($params, $filter_key);
  $this->urlProcessor
    ->setParams($normalized, $filter_key);
  $this
    ->processActiveItems();
  return $this;
}