You are here

function facetapi_facet_enabled in Facet API 6

Same name and namespace in other branches
  1. 6.3 facetapi.module \facetapi_facet_enabled()
  2. 7.2 facetapi.module \facetapi_facet_enabled()
  3. 7 facetapi.module \facetapi_facet_enabled()

Tests whether a single facet is enabled in a given realm.

Parameters

$searcher: A string containing the machine readable name of the searcher module.

$realm_name: A string containing the machine readable name of the realm, pass NULL to test if the facet is enabled in at least one realm.

$facet_name: A string containing the machine readable name of the facet.

Return value

A boolean flagging whether the facet is enabled in the passed realm.

1 call to facetapi_facet_enabled()
FacetapiFacet::processActiveItems in ./facetapi.adapter.inc
Finds and stores the facet's active items.

File

./facetapi.module, line 711
An abstracted facet API that can be used by various search backens.

Code

function facetapi_facet_enabled($searcher, $realm_name = NULL, $facet_name) {
  $enabled_facets = facetapi_enabled_facets_get($searcher, $realm_name, $facet_name);
  return isset($enabled_facets[$facet_name]);
}