function date_timezone_element_process

cis7 date_api_elements.inc date_timezone_element_process($element, &$form_state, $form)
cle7 date_api_elements.inc date_timezone_element_process($element, &$form_state, $form)
elmsmedia7 date_api_elements.inc date_timezone_element_process($element, &$form_state, $form)
icor7 date_api_elements.inc date_timezone_element_process($element, &$form_state, $form)
meedjum_blog7 date_api_elements.inc date_timezone_element_process($element, &$form_state, $form)
mooc7 date_api_elements.inc date_timezone_element_process($element, &$form_state, $form)

Creates a timezone form element.

Parameters

array $element: The timezone form element.

Return value

array the timezone form element

1 string reference to 'date_timezone_element_process'
_date_api_element_info in sites/all/modules/ulmus/date/date_api/date_api_elements.inc
Implements hook_element_info().

File

sites/all/modules/ulmus/date/date_api/date_api_elements.inc, line 233
Date API elements themes and validation. This file is only included during the edit process to reduce memory usage.

Code

function date_timezone_element_process($element, &$form_state, $form) {
  if (date_hidden_element($element)) {
    return $element;
  }

  $element['#tree'] = TRUE;
  $label = theme('date_part_label_timezone', array('part_type' => 'select', 'element' => $element));
  $element['timezone'] = array(
    '#type' => 'select',
    '#title' => $label,
    '#title_display' => $element['#date_label_position'] == 'above' ? 'before' : 'invisible',
    '#options' => date_timezone_names($element['#required']),
    '#value' => $element['#value'],
    '#weight' => $element['#weight'],
    '#required' => $element['#required'],
    '#theme' => 'date_select_element',
    '#theme_wrappers' => array('form_element'),
  );
  if (isset($element['#element_validate'])) {
    array_push($element['#element_validate'], 'date_timezone_validate');
  }
  else {
    $element['#element_validate'] = array('date_timezone_validate');
  }

  $context = array(
    'form' => $form,
  );
  drupal_alter('date_timezone_process', $element, $form_state, $context);

  return $element;
}