You are here

protected property FacetapiAdapter::$activeItems in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/adapter.inc \FacetapiAdapter::activeItems
  2. 7 plugins/facetapi/adapter.inc \FacetapiAdapter::activeItems

An array of active items created by FacetapiAdapter::processActiveItems().

In order to retrieve data efficiently, the active items are stored in two ways. The "filter" key is an associative array of active items keyed by the raw filter passed through the source, usually in field:value format. The "facet" key is a multidimensional array where the second dimension is keyed by the machine name of the facet and the third dimension is an array of active items keyed by the facet value.

The active items are associative arrays containing (but not limited to):

  • field alias: The facet alias defined in the facet definition.
  • value: The active value passed through the source (usually $_GET) to filter the result set.
  • pos: The zero-based position of the value in the source data. The url processor plugin uses the "pos" to efficiently remove certain values when building query strings in FacetapiQueryTypeInterface::getQueryString().

Additional keys may be added to this array via the query type plugin's FacetapiQueryTypeInterface::extract() method. For example, date and range query types add the "start" and "end" values of the range.

Type: array

See also

FacetapiAdapter::processActiveItems()

File

plugins/facetapi/adapter.inc, line 97
Adapter plugin and adapter related classes.

Class

FacetapiAdapter
Abstract class extended by Facet API adapters.

Code

protected $activeItems;