protected function DateRecurModularOscarWidget::getModes in Recurring Date Field Modular Widgets 8
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldWidget/DateRecurModularOscarWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularOscarWidget::getModes()
- 2.x src/Plugin/Field/FieldWidget/DateRecurModularOscarWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularOscarWidget::getModes()
Determine the best suitable mode for a date recur field item.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup[] An array of translatable modes keyed by mode.
Overrides DateRecurModularWidgetBase::getModes
File
- src/
Plugin/ Field/ FieldWidget/ DateRecurModularOscarWidget.php, line 119
Class
- DateRecurModularOscarWidget
- Date recur opening hours widget.
Namespace
Drupal\date_recur_modular\Plugin\Field\FieldWidgetCode
protected function getModes() : array {
return [
static::MODE_ONCE => $this
->t('Once'),
static::MODE_MULTIDAY => $this
->t('Multiple days'),
static::MODE_WEEKLY => $this
->t('Weekly'),
static::MODE_FORTNIGHTLY => $this
->t('Fortnightly'),
static::MODE_MONTHLY => $this
->t('Monthly'),
];
}