You are here

function theme_select_as_checkboxes_fieldset in Better Exposed Filters 6.3

Same name and namespace in other branches
  1. 6 better_exposed_filters.theme \theme_select_as_checkboxes_fieldset()
  2. 6.2 better_exposed_filters.theme \theme_select_as_checkboxes_fieldset()
  3. 7.3 better_exposed_filters.theme \theme_select_as_checkboxes_fieldset()
  4. 7 better_exposed_filters.theme \theme_select_as_checkboxes_fieldset()

Themes a select element as a collection of checkboxes enclosed in a collapsible fieldset

Parameters

array $element - An associative array containing the properties of the element.: Properties used: title, value, options, description

Return value

HTML string representing the form element.

1 string reference to 'theme_select_as_checkboxes_fieldset'
better_exposed_filters_theme in ./better_exposed_filters.module
Implements hook_theme()

File

./better_exposed_filters.theme, line 10

Code

function theme_select_as_checkboxes_fieldset($element) {
  $fieldset = array(
    '#title' => $element['#title'],
    '#collapsible' => TRUE,
    '#description' => $element['#description'],
    '#collapsed' => empty($element['#value']),
    '#attribute' => array(
      'class' => 'bef-select-as-checkboxes-fieldset',
    ),
  );

  // Description is rendered as part of the fieldset, don't render it twice.
  unset($element['#description']);
  $fieldset['#children'] = theme('select_as_checkboxes', $element);
  return theme('fieldset', $fieldset);
}