You are here

public function FacetapiFacet::getSettings in Facet API 6.3

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

Gets facet setting for the passed realm.

Parameters

string|array $realm: The machine readable name of the realm or realm definition. Pass null to get global settings.

Return value

An object containing the settings.

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

File

plugins/facetapi/adapter.inc, line 1008
Adapter plugin and adapter related calsses.

Class

FacetapiFacet
Stores facet data, provides methods that build the facet's render array.

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);
}