public function FacetapiAdapter::getFacet in Facet API 6
Same name and namespace in other branches
- 6.3 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacet()
- 7.2 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacet()
- 7 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacet()
Returns an instance of FacetapiFacet for a facet.
Parameters
$facet: An array containing the facet definition.
Return value
A FacetapiFacet object.
File
- ./
facetapi.adapter.inc, line 200 - Defines classes used by the FacetAPI module.
Class
- FacetapiAdapter
- Abstract class extended by search backends that retrieves facet information from the database.
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']];
}