public function HMSService::format_options in HMS Field 8
Returns possible format options.
Return value
array
Overrides HMSServiceInterface::format_options
File
- src/
HMSService.php, line 91
Class
- HMSService
- Provides a service to handle various hms related functionality.
Namespace
Drupal\hms_fieldCode
public function format_options() {
$format = drupal_static(__FUNCTION__);
if (empty($format)) {
$format = [
'ISO 8601 based' => [
'h:mm' => 'h:mm',
'hh:mm:ss' => 'hh:mm:ss',
'h:mm:ss' => 'h:mm:ss',
'm:ss' => 'm:ss',
'h' => 'h',
'm' => 'm',
's' => 's',
],
'Space separated' => [
'hms' => 'e.q. 3h 15m 30s',
],
];
\Drupal::moduleHandler()
->alter('hms_format', $format);
}
return $format;
}