You are here

public function FacetapiAdapter::getFacet in Facet API 7

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacet()
  2. 6 facetapi.adapter.inc \FacetapiAdapter::getFacet()
  3. 7.2 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacet()

Returns a FacetapiFacet instance for the facet being rendered.

Parameters

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

Return value

FacetapiFacet The facet rendering object object.

2 calls to FacetapiAdapter::getFacet()
FacetapiAdapter::getFacetSettings in plugins/facetapi/adapter.inc
Returns realm specific settings for a facet.
FacetapiAdapter::processFacets in plugins/facetapi/adapter.inc
Initializes facet builds, sets the breadcrumb trail.

File

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

Class

FacetapiAdapter
Abstract class extended by Facet API adapters.

Code

public function getFacet(array $facet) {
  if (!isset($this->facets[$facet['name']])) {
    $this->facets[$facet['name']] = new FacetapiFacet($this, $facet);
  }
  return $this->facets[$facet['name']];
}