You are here

public function FractionFormatter::settingsSummary in Fraction 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldFormatter/FractionFormatter.php \Drupal\fraction\Plugin\Field\FieldFormatter\FractionFormatter::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 FractionFormatterBase::settingsSummary

File

src/Plugin/Field/FieldFormatter/FractionFormatter.php, line 51

Class

FractionFormatter
Plugin implementation of the 'fraction' formatter.

Namespace

Drupal\fraction\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();

  // Summarize the separator setting.
  $separator = $this
    ->getSetting('separator');
  $summary[] = $this
    ->t('Separator: @separator', [
    '@separator' => $separator,
  ]);
  return $summary;
}