theme_checkboxes

Versions
4.7 – 6
theme_checkboxes($element)
7
theme_checkboxes($variables)

Theme 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.

Return value

A themed HTML string representing the checkbox set.

Related topics

Code

includes/form.inc, line 2175

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

  return $element['#children'];
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.