public function TextFormatter::settingsSummary in Heading field 8
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
- src/
Plugin/ Field/ FieldFormatter/ TextFormatter.php, line 54
Class
- TextFormatter
- Plugin to format string & text fields as a heading.
Namespace
Drupal\heading\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
$summary[] = $this
->t('Heading (@size)', [
'@size' => strtoupper($this
->getSetting('size')),
]);
return $summary;
}