You are here

function _hms_format_options in HMS Field 7

Returns possible format options.

4 calls to _hms_format_options()
hms_field_field_formatter_settings_form in ./hms_field.module
Implements hook_field_formatter_settings_form().
hms_field_field_instance_settings_form in ./hms_field.module
Implements hook_field_instance_settings_form().
hms_field_views_handler_filter_hms::options_form in views/hms_field_views_handler_filter_hms.inc
Provide the basic form which calls through to subforms.
hms_field_views_handler_filter_hms::option_definition in views/hms_field_views_handler_filter_hms.inc
Information about options for all kinds of purposes will be held here.

File

./hms_field.module, line 386
Provides an hms_field functionality.

Code

function _hms_format_options() {
  $format = drupal_static(__FUNCTION__);
  if (empty($format)) {
    $format = array(
      'ISO 8601 based' => array(
        'h:mm' => 'h:mm',
        'h:mm:ss' => 'h:mm:ss',
        'm:ss' => 'm:ss',
        'h' => 'h',
        'm' => 'm',
        's' => 's',
      ),
      'Space separated' => array(
        'hms' => 'e.q. 3h 15m 30s',
      ),
    );
    drupal_alter('hms_format', $format);
  }
  return $format;
}