function facetapi_widget_select in Facet API 6
Builds items as a select list element.
Parameters
&$build: The facet's render array.
&$key: A string containing the key the facet's render array will be appended to.
&$settings: An array containing the JavaScript settings.
1 string reference to 'facetapi_widget_select'
- facetapi_facetapi_widget_info in ./
facetapi.module - Implementation of hook_facetapi_widget_info().
File
- ./
facetapi.widget.inc, line 115 - Widget callbacks and building functions.
Code
function facetapi_widget_select(array &$build, &$key, &$settings) {
$build['#type'] = 'select';
$build['#default_value'] = $build['#adapter']
->getActiveValues($build['#facet']);
$build['#options'] = facetapi_form_options_get($build, TRUE);
$build['#prefix'] = '<div class="criterion">';
$build['#suffix'] = '</div>';
unset($build[$build['#facet']['field alias']]);
}