You are here

public function DurationTimeFormatter::settingsSummary in Duration Field 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/DurationTimeFormatter.php \Drupal\duration_field\Plugin\Field\FieldFormatter\DurationTimeFormatter::settingsSummary()
  2. 3.0.x src/Plugin/Field/FieldFormatter/DurationTimeFormatter.php \Drupal\duration_field\Plugin\Field\FieldFormatter\DurationTimeFormatter::settingsSummary()

Returns a short summary for the current formatter settings.

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

Return value

string[] A short summary of the formatter settings.

Overrides FormatterBase::settingsSummary

File

src/Plugin/Field/FieldFormatter/DurationTimeFormatter.php, line 24

Class

DurationTimeFormatter
Provides a formatter for the duration field type.

Namespace

Drupal\duration_field\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = t('Displays the duration in the format @format', [
    '@format' => $this
      ->getDisplayFormat(),
  ]);
  return $summary;
}