function NumericFormatterBase::settingsSummary

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericFormatterBase::settingsSummary()
  2. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericFormatterBase::settingsSummary()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericFormatterBase::settingsSummary()

Overrides FormatterBase::settingsSummary

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php, line 47

Class

NumericFormatterBase
Parent plugin for decimal and integer formatters.

Namespace

Drupal\Core\Field\Plugin\Field\FieldFormatter

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.