public function FacetapiFacet::itemActive in Facet API 6
Tests whether a facet item is active by passing it's value.
NOTE: This method returns an integer instead of a boolean because the value is used by the Facet API's custom sorting functions. It ends up being less code to compare integers than booleans.
Parameters
$value: A string containing the facet item's value.
Return value
An integer, 1 if the item is active, 0 if it is inactive.
1 call to FacetapiFacet::itemActive()
- FacetapiFacet::buildItems in ./
facetapi.adapter.inc - Builds the render array for the facet's items.
File
- ./
facetapi.adapter.inc, line 337 - Defines classes used by the FacetAPI module.
Class
- FacetapiFacet
- Stores facet data, provides methods that build the facet's render array.
Code
public function itemActive($value) {
return (int) isset($this->_active[$value]);
}