function date_theme in Date 6.2
Same name and namespace in other branches
- 8 date.module \date_theme()
- 6 date/date.module \date_theme()
- 7.3 date.module \date_theme()
- 7 date.module \date_theme()
- 7.2 date.module \date_theme()
Implementation of hook_theme().
File
- date/
date.module, line 259 - Defines date/time field types for the Content Construction Kit (CCK).
Code
function date_theme() {
$path = drupal_get_path('module', 'date');
require_once "./{$path}/date.theme";
$base = array(
'file' => 'date.theme',
'path' => "{$path}",
);
$themes = array(
'date_combo' => array(
'arguments' => array(
'element' => NULL,
),
),
'date_all_day' => array(
'arguments' => array(
'which' => NULL,
'date1' => NULL,
'date2' => NULL,
'format' => NULL,
'node' => NULL,
'view' => NULL,
),
),
'date_all_day_label' => array(
'arguments' => array(),
),
'date_display_single' => array(
'arguments' => array(
'date' => NULL,
'timezone' => NULL,
),
),
'date_display_range' => array(
'arguments' => array(
'date1' => NULL,
'date2' => NULL,
'timezone' => NULL,
),
),
'date_text_parts' => array(
'arguments' => array(
'element' => NULL,
),
),
'date' => array(
'arguments' => array(
'element' => NULL,
),
),
'date_formatter_default' => $base + array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_date_display_combination',
),
'date_formatter_format_interval' => $base + array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_date_format_interval',
),
'date_formatter_format_calendar_day' => $base + array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_date_format_calendar_day',
),
'date_repeat_display' => $base + array(
'arguments' => array(
'field' => NULL,
'item' => NULL,
'node' => NULL,
'dates' => NULL,
),
'function' => 'theme_date_repeat_display',
),
);
// Table isn't available first time date_theme() is called in update.php.
if (db_table_exists('date_format_types')) {
$format_types = date_get_format_types('', TRUE);
if (!empty($format_types)) {
foreach ($format_types as $type => $type_info) {
$themes['date_formatter_' . $type] = $base + array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_date_display_combination',
);
}
}
}
return $themes;
}