Projet

Général

Profil

Paste
Télécharger (910 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / templates / system / date.func.php @ 7547bb19

1
<?php
2
/**
3
 * @file
4
 * Stub file for bootstrap_date().
5
 */
6

    
7
/**
8
 * Returns HTML for a date selection form element.
9
 *
10
 * @param array $variables
11
 *   An associative array containing:
12
 *   - element: An associative array containing the properties of the element.
13
 *     Properties used: #title, #value, #options, #description, #required,
14
 *     #attributes.
15
 *
16
 * @return string
17
 *   The constructed HTML.
18
 *
19
 * @see theme_date()
20
 *
21
 * @ingroup theme_functions
22
 */
23
function bootstrap_date($variables) {
24
  $element = $variables['element'];
25

    
26
  $attributes = array();
27
  if (isset($element['#id'])) {
28
    $attributes['id'] = $element['#id'];
29
  }
30
  if (!empty($element['#attributes']['class'])) {
31
    $attributes['class'] = (array) $element['#attributes']['class'];
32
  }
33
  $attributes['class'][] = 'form-inline';
34

    
35
  return '<div' . drupal_attributes($attributes) . '>' . drupal_render_children($element) . '</div>';
36
}