You are here

public function FacetapiWidgetLinks::__construct in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/widget_links.inc \FacetapiWidgetLinks::__construct()
  2. 7 plugins/facetapi/widget_links.inc \FacetapiWidgetLinks::__construct()

Overrides FacetapiWidget::__construct().

For links, it is better to use the machine name of the facet as opposed to the alias for the key. Alias are usually, but not necessarily, unique. It doesn't make sense to group links in the same element as they are usually rendered in blocks with are separate from one another.

Overrides FacetapiWidget::__construct

File

plugins/facetapi/widget_links.inc, line 24
The facetapi_links and facetapi_checkbox_links widget plugin classes.

Class

FacetapiWidgetLinks
Widget that renders facets as a list of clickable links.

Code

public function __construct($id, array $realm, FacetapiFacet $facet, stdClass $settings) {
  parent::__construct($id, $realm, $facet, $settings);
  $this->jsSettings['limit'] = $this->settings->settings['soft_limit'];
  $this->key = $facet['name'];
}