You are here

public function TextHeaderFormatter::settingsSummary in Header formatter 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/TextHeaderFormatter.php, line 87

Class

TextHeaderFormatter
Plugin implementation of the 'text_header' formatter.

Namespace

Drupal\header_formatter\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $summary[] = "Header level: H{$this->getSetting('level')}";
  return $summary;
}