public function NumericFormatterBase::settingsSummary in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericFormatterBase::settingsSummary()
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\NumericFormatterBase::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
- 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\FieldFormatterCode
public function settingsSummary() {
$summary = [];
$summary[] = $this
->numberFormat(1234.123456789);
if ($this
->getSetting('prefix_suffix')) {
$summary[] = t('Display with prefix and suffix.');
}
return $summary;
}