You are here

function facetapi_get_searcher_settings in Facet API 6.3

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

Gets raw settings from the datbase, caches as a satic variable.

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

Parameters

$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.

File

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

Code

function facetapi_get_searcher_settings($searcher) {
  $settings =& ctools_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];
}