function _timefield_duration_options in Timefield 7
Same name and namespace in other branches
- 1.0.x timefield.module \_timefield_duration_options()
Helper function to build options array
4 calls to _timefield_duration_options()
- timefield_field_formatter_settings_form in ./
timefield.module - Implements hook_field_formatter_settings_form().
- timefield_field_formatter_settings_summary in ./
timefield.module - Implements hook_field_formatter_settings_summary().
- timefield_handler_field_timefield_duration::options_form in views/
timefield_handler_field_timefield_duration.inc - Default options form provides the label widget that all fields should have.
- timefield_handler_filter_timefield_duration::options_form in views/
timefield_handler_filter_timefield_duration.inc - Provide the basic form which calls through to subforms.
File
- ./
timefield.module, line 1133 - Defines a Field API field for time
Code
function _timefield_duration_options($current_option = NULL) {
$values = array(
'hours' => t('Duration in decimal hours, e.g. 1.5'),
'seconds' => t('Duration in seconds'),
'minutes' => t('Duration in minutes'),
'time' => t('Duration in time format hours, e.g. 1:30'),
);
if (is_null($current_option)) {
return $values;
}
else {
return $values[$current_option];
}
}