You are here

function facetapi_save_facet_enabled in Facet API 7

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

Enables a facet in a given realm, stores settings in the database.

@reutrn TRUE if the operation succeeded, FALSE otherwise.

Parameters

FacetapiAdapter $adapter: The adapter object of the searcher the settings are being modified for.

array $realm: The realm definition as returned by facetapi_realm_load().

array $facet: The facet definition as returned by facetapi_facet_load().

string $weight: If the realm is sortable, allows the assigning of a weight. Pass FALSE to maintain the previously stored value.

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

5 calls to facetapi_save_facet_enabled()
FacetapiApiFunctions::testFacetEnabled in tests/facetapi.test
Tests the facetapi_facet_enabled() function.
FacetapiApiFunctions::testSaveFacetStatus in tests/facetapi.test
Tests facetapi_save_facet_status() API functions.
FacetapiApiFunctions::testSetFacetStatus in tests/facetapi.test
Tests facetapi_set_facet_status() API functions.
FacetapiApiFunctions::testUrlProcessorDataProcessing in tests/facetapi.test
Test active item processing via the url processor plugin.
FacetapiApiFunctions::testUrlProcessorQueryString in tests/facetapi.test
Test query string building via the url processor plugin.

File

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

Code

function facetapi_save_facet_enabled(FacetapiAdapter $adapter, array $realm, array $facet, $weight = FALSE, $batch_process = FALSE) {
  return facetapi_save_facet_status($adapter, $realm, $facet, TRUE, $weight, $batch_process);
}