function date_widget_info in Date 6.2
Same name and namespace in other branches
- 5.2 date/date.module \date_widget_info()
- 5 date.module \date_widget_info()
- 6 date/date.module \date_widget_info()
Implementation of hook_widget_info().
1 call to date_widget_info()
- date_tools_wizard_widget_types in date_tools/
date_tools.wizard.inc
File
- date/
date.module, line 138 - Defines date/time field types for the Content Construction Kit (CCK).
Code
function date_widget_info() {
$info = array(
'date_select' => array(
'label' => t('Select List'),
'field types' => array(
'date',
'datestamp',
'datetime',
),
'multiple values' => CONTENT_HANDLE_CORE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_CUSTOM,
),
),
'date_select_repeat' => array(
'label' => t('Select List with Repeat options'),
'field types' => array(
'date',
'datestamp',
'datetime',
),
'multiple values' => CONTENT_HANDLE_MODULE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_CUSTOM,
),
),
'date_text' => array(
'label' => t('Text Field with custom input format'),
'field types' => array(
'date',
'datestamp',
'datetime',
),
'multiple values' => CONTENT_HANDLE_CORE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_CUSTOM,
),
),
'date_text_repeat' => array(
'label' => t('Text Field with Repeat options'),
'field types' => array(
'date',
'datestamp',
'datetime',
),
'multiple values' => CONTENT_HANDLE_MODULE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_CUSTOM,
),
),
);
if (module_exists('date_popup')) {
$info['date_popup'] = array(
'label' => t('Text Field with Date Pop-up calendar'),
'field types' => array(
'date',
'datestamp',
'datetime',
),
'multiple values' => CONTENT_HANDLE_CORE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_CUSTOM,
),
);
$info['date_popup_repeat'] = array(
'label' => t('Text Field with Date Pop-up and Repeat options'),
'field types' => array(
'date',
'datestamp',
'datetime',
),
'multiple values' => CONTENT_HANDLE_MODULE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_CUSTOM,
),
);
}
if (!module_exists('date_repeat')) {
unset($info['date_select_repeat']);
unset($info['date_text_repeat']);
if (isset($info['date_popup_repeat'])) {
unset($info['date_popup_repeat']);
}
}
return $info;
}