You are here

function hook_facetapi_widgets in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 facetapi.api.php \hook_facetapi_widgets()
  2. 7 facetapi.api.php \hook_facetapi_widgets()

Define all widget plugins provided by the module.

Widget plugins process the facet render arrays to the structure that wille be passed to drupal_render(), which in turn converts the facet to HTML.

Return value

array An associative array keyed by unique name of the widget. Each widget is an associative array keyed by "handler" containing:

  • label: The human readable name of the plugin displayed in the admin UI.
  • class: The name of the plugin class.
  • query types: An array of query-types that this widget is compatible with

See also

FacetapiFilter

1 function implements hook_facetapi_widgets()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

facetapi_facetapi_widgets in ./facetapi.facetapi.inc

File

./facetapi.api.php, line 449
Hooks provided by the Facet API module.

Code

function hook_facetapi_widgets() {
  return array(
    'facetapi_links' => array(
      'handler' => array(
        'label' => t('Links'),
        'class' => 'FacetapiWidgetLinks',
        'query types' => array(
          'term',
          'date',
        ),
      ),
    ),
  );
}