public function FacetapiFilter::__construct in Facet API 7.2
Same name and namespace in other branches
- 6.3 plugins/facetapi/filter.inc \FacetapiFilter::__construct()
- 7 plugins/facetapi/filter.inc \FacetapiFilter::__construct()
Constructs a FacetapiFilter object.
Sets the necessary information required to filter the facet.
Parameters
string $id: The machine name of the filter plugin being instantiated as defined in hook_facetapi_filters() implementations.
FacetapiAdapter $adapter: The adapter associated with facet being filtered.
stdClass $settings: The facet's realm specific settings as returned by FacetapiAdapter::getFacetSettings().
File
- plugins/
facetapi/ filter.inc, line 64 - Base filter class and core implementations.
Class
- FacetapiFilter
- Abstract class extended by filter plugins.
Code
public function __construct($id, FacetapiAdapter $adapter, stdClass $settings) {
$this->id = $id;
$this->adapter = $adapter;
$this->settings = $settings;
$this->settings->settings += $this
->getDefaultSettings();
}