You are here

function date_facets_get_supported_widgets in Date Facets 7

Returns list of widgets which support "date_ranges".

1 call to date_facets_get_supported_widgets()
date_facets_form_facetapi_facet_display_form_alter in ./date_facets.admin.inc
Implements hook_form_alter().

File

./date_facets.module, line 284
Provides date range facets that are similar to implementations in major search engines.

Code

function date_facets_get_supported_widgets() {
  $supported_widgets = array();
  $all_widgets = module_invoke_all('facetapi_widgets');
  foreach ($all_widgets as $widget_name => $widget) {
    if (!empty($widget['handler']['query types'])) {
      if (array_search(DATE_FACETS_DATE_RANGE_QUERY_TYPE, $widget['handler']['query types']) !== FALSE) {
        $supported_widgets[] = $widget_name;
      }
    }
  }
  return $supported_widgets;
}