You are here

function facetapi_set_facet_enabled in Facet API 7

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

Enables a facet for this page load only.

If you are enabling facets in the block realm, you will have to force the delta mapping so that the block can be configured even if it is disabled via the Facet API interface. Otherwise you will not be able to assign the block to a region because it won't be available in admin/structure/block.

Parameters

$searcher: The machine readable name of the searcher.

$realm_name: The machine readable name of the realm, pass NULL for all realms.

$facet_name: The machine readable name of the facet.

$batch_process: A boolean flagging whether batch processing is being performed.

See also

facetapi_set_facet_status()

hook_facetapi_force_delta_mapping()

1 call to facetapi_set_facet_enabled()
FacetapiApiFunctions::testSetFacetStatus in tests/facetapi.test
Tests facetapi_set_facet_status() API functions.

File

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

Code

function facetapi_set_facet_enabled($searcher, $realm_name, $facet_name, $batch_process = FALSE) {
  return facetapi_set_facet_status($searcher, $realm_name, $facet_name, TRUE, $batch_process);
}