function DateTimeDatelistWidget::settingsSummary

Same name in other branches
  1. 9 core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php \Drupal\datetime\Plugin\Field\FieldWidget\DateTimeDatelistWidget::settingsSummary()
  2. 8.9.x core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php \Drupal\datetime\Plugin\Field\FieldWidget\DateTimeDatelistWidget::settingsSummary()
  3. 10 core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php \Drupal\datetime\Plugin\Field\FieldWidget\DateTimeDatelistWidget::settingsSummary()

Overrides WidgetBase::settingsSummary

File

core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php, line 128

Class

DateTimeDatelistWidget
Plugin implementation of the 'datetime_datelist' widget.

Namespace

Drupal\datetime\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
    $summary = [];
    $summary[] = $this->t('Date part order: @order', [
        '@order' => $this->getSetting('date_order'),
    ]);
    if ($this->getFieldSetting('datetime_type') == 'datetime') {
        $summary[] = $this->t('Time type: @time_type', [
            '@time_type' => $this->getSetting('time_type'),
        ]);
        $summary[] = $this->t('Time increments: @increment', [
            '@increment' => $this->getSetting('increment'),
        ]);
    }
    return $summary;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.