You are here

function date_theme in Date 8

Same name and namespace in other branches
  1. 6.2 date/date.module \date_theme()
  2. 6 date/date.module \date_theme()
  3. 7.3 date.module \date_theme()
  4. 7 date.module \date_theme()
  5. 7.2 date.module \date_theme()

Implements hook_theme().

File

./date.module, line 73
Defines date/time field types.

Code

function date_theme() {
  $path = drupal_get_path('module', 'date');
  module_load_include('theme', 'date', 'date');
  $base = array(
    'file' => 'date.theme',
    'path' => "{$path}",
  );
  $themes = array(
    'date_combo' => $base + array(
      'render element' => 'element',
    ),
    'date_text_parts' => $base + array(
      'render element' => 'element',
    ),
    'date' => $base + array(
      'render element' => 'element',
    ),
    'date_display_single' => $base + array(
      'variables' => array(
        'date' => NULL,
        'timezone' => NULL,
        'dates' => NULL,
        'attributes' => array(),
        'rdf_mapping' => NULL,
        'add_rdf' => NULL,
      ),
    ),
    'date_display_range' => $base + array(
      'variables' => array(
        'date1' => NULL,
        'date2' => NULL,
        'timezone' => NULL,
        'dates' => NULL,
        // HTML attributes that will be applied to both the start and end dates
        // (unless overridden).
        'attributes' => array(),
        // HTML attributes that will be applied to the start date only.
        'attributes_start' => array(),
        // HTML attributes that will be applied to the end date only.
        'attributes_end' => array(),
        'rdf_mapping' => NULL,
        'add_rdf' => NULL,
      ),
    ),
    'date_display_combination' => $base + array(
      'variables' => array(
        'entity_type' => NULL,
        'entity' => NULL,
        'field' => NULL,
        'instance' => NULL,
        'langcode' => NULL,
        'item' => NULL,
        'delta' => NULL,
        'display' => NULL,
        'dates' => NULL,
        'attributes' => array(),
        'rdf_mapping' => NULL,
        'add_rdf' => NULL,
      ),
    ),
    'date_display_interval' => $base + array(
      'variables' => array(
        'entity_type' => NULL,
        'entity' => NULL,
        'field' => NULL,
        'instance' => NULL,
        'langcode' => NULL,
        'item' => NULL,
        'delta' => NULL,
        'display' => NULL,
        'dates' => NULL,
        'attributes' => array(),
        'rdf_mapping' => NULL,
        'add_rdf' => NULL,
      ),
    ),
  );
  return $themes;
}