You are here

public function IntervalWidget::settingsSummary in Interval Field 8

Returns a short summary for the current widget settings.

If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings.

Return value

array A short summary of the widget settings.

Overrides WidgetBase::settingsSummary

File

src/Plugin/Field/FieldWidget/IntervalWidget.php, line 121

Class

IntervalWidget
Provides an interval widget.

Namespace

Drupal\interval\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = t('Allowed periods: @periods', [
    '@periods' => implode(', ', array_filter($this
      ->getSetting('allowed_periods'))),
  ]);
  return $summary;
}