You are here

public function TimeRangeFormatter::settingsSummary in Opigno calendar 8

Same name and namespace in other branches
  1. 3.x src/Plugin/Field/FieldFormatter/TimeRangeFormatter.php \Drupal\opigno_calendar\Plugin\Field\FieldFormatter\TimeRangeFormatter::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 DateRangeCustomFormatter::settingsSummary

File

src/Plugin/Field/FieldFormatter/TimeRangeFormatter.php, line 107

Class

TimeRangeFormatter
Time range with optional date formatter.

Namespace

Drupal\opigno_calendar\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $separator = $this
    ->getSetting('time_separator');
  if ($separator) {
    $summary[] = $this
      ->t('Time separator: %separator', [
      '%separator' => $separator,
    ]);
  }
  return $summary;
}