theme_checkboxes

  1. drupal
    1. 5
    2. 6
    3. 7
    4. 8
Versions
5 – 6 theme_checkboxes($element)
8 – 7 theme_checkboxes($variables)

Returns HTML for a set of checkbox form elements.

Parameters

$variables An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #children, #attributes.

Related topics

Code

includes/form.inc, line 2997

<?php
function theme_checkboxes($variables) {
  $element = $variables['element'];
  $attributes = array();
  if (isset($element['#id'])) {
    $attributes['id'] = $element['#id'];
  }
  $attributes['class'][] = 'form-checkboxes';
  if (!empty($element['#attributes']['class'])) {
    $attributes['class'] = array_merge($attributes['class'], $element['#attributes']['class']);
  }
  return '<div' . drupal_attributes($attributes) . '>' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';
}
?>