You are here

function theme_select_as_radios in Better Exposed Filters 6

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

Themes a select drop-down as a collection of radio buttons

Parameters

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

Return value

HTML string representing the form element.

See also

theme_select(), http://api.drupal.org/api/function/theme_select/6

1 string reference to 'theme_select_as_radios'
better_exposed_filters_theme in ./better_exposed_filters.module
Implements hook_theme()
1 theme call to theme_select_as_radios()
theme_select_as_radios_fieldset in ./better_exposed_filters.theme
Themes a select element as a collection of radio buttons enclosed in a collapsible fieldset

File

./better_exposed_filters.theme, line 183

Code

function theme_select_as_radios($element) {
  if (!empty($element['#bef_nested'])) {
    return theme('select_as_tree', $element);
  }
  $output = '';
  foreach (element_children($element) as $key) {
    $output .= theme('radio', $element[$key]);
  }
  return '<div class="bef-select-as-radios">' . $output . '</div>';
}