You are here

function facetapi_get_searcher_settings in Facet API 7

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

Gets raw settings from the database, caches as a static variable.

Avoid using this function directly as it will not load default settings. Use the FacetapiAdapter::getFacetSettings*() method instead.

Parameters

string $searcher: A string containing the searcher.

Return value

array An array of settings keyed by name.

See also

FacetapiAdapter::getFacetSettings()

FacetapiAdapter::getFacetSettingsGlobal()

2 calls to facetapi_get_searcher_settings()
FacetapiAdapter::initSettingsObject in plugins/facetapi/adapter.inc
Initializes a new settings object.
facetapi_get_enabled_facets in ./facetapi.module
Returns all enabled facet definitions available to the searcher.
2 string references to 'facetapi_get_searcher_settings'
FacetapiTestCase::drupalPost in tests/facetapi.test
Overrides DrupalWebTestCase::drupalPost()
facetapi_save_facet_status in ./facetapi.module
Sets the facet status in a given realm, stores settings in the database.

File

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

Code

function facetapi_get_searcher_settings($searcher) {
  $settings =& drupal_static(__FUNCTION__, array());
  if (!isset($settings[$searcher])) {
    ctools_include('export');
    $args = array(
      'searcher' => $searcher,
    );
    $settings[$searcher] = ctools_export_load_object('facetapi', 'conditions', $args);
  }
  return $settings[$searcher];
}