You are here

public function FacetapiAdapter::itemActive in Facet API 7

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/adapter.inc \FacetapiAdapter::itemActive()
  2. 6 facetapi.adapter.inc \FacetapiAdapter::itemActive()
  3. 7.2 plugins/facetapi/adapter.inc \FacetapiAdapter::itemActive()

Tests whether a facet item is active by passing it's value.

Parameters

string $facet_name: The machine readable name of the facet.

string $value: The facet item's value.

Return value

int Returns 1 if the item is active, 0 if it is inactive.

File

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

Class

FacetapiAdapter
Abstract class extended by Facet API adapters.

Code

public function itemActive($facet_name, $value) {
  return (int) isset($this->activeItems['facet'][$facet_name][$value]);
}