You are here

public function FacetapiWidgetLinks::execute in Facet API 7.2

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

Implements FacetapiWidget::execute().

Transforms the render array into something that can be themed by theme_item_list().

Overrides FacetapiWidget::execute

See also

FacetapiWidgetLinks::setThemeHooks()

FacetapiWidgetLinks::buildListItems()

File

plugins/facetapi/widget_links.inc, line 39
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 execute() {
  $element =& $this->build[$this->facet['field alias']];

  // Sets each item's theme hook, builds item list.
  $this
    ->setThemeHooks($element);
  $element = array(
    '#theme' => 'item_list',
    '#items' => $this
      ->buildListItems($element),
    '#attributes' => $this->build['#attributes'],
  );
}