protected function DateRangeDurationWidget::getTimeIncrementOptions in Datetime Extras 8
Return the possible options for time increments.
Return value
array Valid options for time increments, keyed by seconds, values are labels.
2 calls to DateRangeDurationWidget::getTimeIncrementOptions()
- DateRangeDurationWidget::settingsForm in src/
Plugin/ Field/ FieldWidget/ DateRangeDurationWidget.php - Returns a form to configure settings for the widget.
- DateRangeDurationWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ DateRangeDurationWidget.php - Returns a short summary for the current widget settings.
File
- src/
Plugin/ Field/ FieldWidget/ DateRangeDurationWidget.php, line 89
Class
- DateRangeDurationWidget
- Plugin implementation of the 'daterange_duration' widget.
Namespace
Drupal\datetime_extras\Plugin\Field\FieldWidgetCode
protected function getTimeIncrementOptions() {
return [
1 => $this
->t('1 second'),
30 => $this
->t('30 seconds'),
60 => $this
->t('1 minute'),
300 => $this
->t('5 minutes'),
600 => $this
->t('10 minutes'),
900 => $this
->t('15 minutes'),
1800 => $this
->t('30 minutes'),
3600 => $this
->t('1 hour'),
86400 => $this
->t('1 day'),
];
}