You are here

public function FacetapiFacet::getSettings in Facet API 7

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/adapter.inc \FacetapiFacet::getSettings()
  2. 7.2 plugins/facetapi/adapter.inc \FacetapiFacet::getSettings()

Returns realm specific or global settings for a facet.

Parameters

string|array $realm: The machine readable name of the realm or an array containing the realm definition. Pass NULL to return the facet's global settings.

Return value

An object containing the settings.

See also

FacetapiAdapter::getFacetSettings()

FacetapiAdapter::getFacetSettingsGlobal()

1 call to FacetapiFacet::getSettings()
FacetapiFacet::build in plugins/facetapi/adapter.inc
Build the facet's render array for the realm.

File

plugins/facetapi/adapter.inc, line 1252
Adapter plugin and adapter related classes.

Class

FacetapiFacet
Wrapper around the facet definition with methods that build render arrays.

Code

public function getSettings($realm = NULL) {
  if ($realm && !is_array($realm)) {
    $realm = facetapi_realm_load($realm);
  }
  $method = $realm ? 'getFacetSettings' : 'getFacetSettingsGlobal';
  return $this->adapter
    ->{$method}($this->facet, $realm);
}