public function FacetapiAdapter::getFacetQuery in Facet API 7.2
Same name and namespace in other branches
- 6.3 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacetQuery()
- 7 plugins/facetapi/adapter.inc \FacetapiAdapter::getFacetQuery()
Returns the facet's instantiated query type plugin.
Parameters
array|string $facet: Either the facet definition as returned by facetapi_facet_load() or the machine readable name of the facet.
Return value
FacetapiQueryTypeInterface|NULL The instantiated query type plugin, NULL if the passed facet is not valid or does not have a query type plugin associated with it.
File
- plugins/
facetapi/ adapter.inc, line 927 - Adapter plugin and adapter related classes.
Class
- FacetapiAdapter
- Abstract class extended by Facet API adapters.
Code
public function getFacetQuery($facet) {
$facet_name = is_array($facet) ? $facet['name'] : $facet;
if (isset($this->queryTypes[$facet_name])) {
return $this->queryTypes[$facet_name];
}
}