public function FacetapiAdapter::getActiveItems in Facet API 7.2
Same name and namespace in other branches
- 6.3 plugins/facetapi/adapter.inc \FacetapiAdapter::getActiveItems()
- 6 facetapi.adapter.inc \FacetapiAdapter::getActiveItems()
- 7 plugins/facetapi/adapter.inc \FacetapiAdapter::getActiveItems()
Returns a facet's active items.
Parameters
array|string $facet: Either the facet definition as returned by facetapi_facet_load() or the machine readable name of the facet.
Return value
array An associative array 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 added to the array by the query type plugin's FacetapiQueryTypeInterface::extract() method. For example, date and range query types add the "start" and "end" values of the range.
File
- plugins/
facetapi/ adapter.inc, line 440 - Adapter plugin and adapter related classes.
Class
- FacetapiAdapter
- Abstract class extended by Facet API adapters.
Code
public function getActiveItems(array $facet) {
return $this->activeItems['facet'][$facet['name']];
}