protected function DateRecurModularAlphaWidget::getModes in Recurring Date Field Modular Widgets 2.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldWidget/DateRecurModularAlphaWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularAlphaWidget::getModes()
- 3.x src/Plugin/Field/FieldWidget/DateRecurModularAlphaWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularAlphaWidget::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/ DateRecurModularAlphaWidget.php, line 73
Class
- DateRecurModularAlphaWidget
- Date recur alpha 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'),
];
}