You are here

public function FractionFormatterBase::settingsSummary in Fraction 8

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

2 calls to FractionFormatterBase::settingsSummary()
FractionDecimalFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FractionDecimalFormatter.php
Returns a short summary for the current formatter settings.
FractionFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FractionFormatter.php
Returns a short summary for the current formatter settings.
2 methods override FractionFormatterBase::settingsSummary()
FractionDecimalFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FractionDecimalFormatter.php
Returns a short summary for the current formatter settings.
FractionFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FractionFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/FractionFormatterBase.php, line 44

Class

FractionFormatterBase
Base class for fraction formatters.

Namespace

Drupal\fraction\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  if ($this
    ->getSetting('prefix_suffix')) {
    $summary[] = $this
      ->t('Display with prefix and suffix.');
  }
  return $summary;
}