public function FacetapiWidget::__construct in Facet API 7.2
Same name and namespace in other branches
- 6.3 plugins/facetapi/widget.inc \FacetapiWidget::__construct()
- 7 plugins/facetapi/widget.inc \FacetapiWidget::__construct()
Constructs a FacetapiWidget object.
Parameters
string $id: The machine name of the plugin associated with this instance.
array $realm: The realm definition as returned by facetapi_realm_load() that this facet is being rendered in.
FacetapiFacet $facet: The facet being rendered.
stdClass $settings: The facet's realm specific settings as returned by FacetapiAdapter::getFacetSettings().
1 call to FacetapiWidget::__construct()
- FacetapiWidgetLinks::__construct in plugins/
facetapi/ widget_links.inc - Overrides FacetapiWidget::__construct().
1 method overrides FacetapiWidget::__construct()
- FacetapiWidgetLinks::__construct in plugins/
facetapi/ widget_links.inc - Overrides FacetapiWidget::__construct().
File
- plugins/
facetapi/ widget.inc, line 101 - Base widget plugin class and helper functions for facet sorting.
Class
- FacetapiWidget
- Abstract class extended by widget plugins.
Code
public function __construct($id, array $realm, FacetapiFacet $facet, stdClass $settings) {
$this->id = $id;
$this->realm = $realm;
$this->settings = $settings;
$this->settings->settings += $this
->getDefaultSettings();
$this->facet = $facet;
// Set the default key as the facet's alias.
$this->key = $facet['field alias'];
}