public function TextTrimmedFormatter::settingsSummary in Drupal 8
Same name and namespace in other branches
- 9 core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php \Drupal\text\Plugin\Field\FieldFormatter\TextTrimmedFormatter::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/
modules/ text/ src/ Plugin/ Field/ FieldFormatter/ TextTrimmedFormatter.php, line 61
Class
- TextTrimmedFormatter
- Plugin implementation of the 'text_trimmed' formatter.
Namespace
Drupal\text\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
$summary[] = t('Trimmed limit: @trim_length characters', [
'@trim_length' => $this
->getSetting('trim_length'),
]);
return $summary;
}