You are here

public function TextTrimmedFormatter::settingsSummary in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 64
Contains \Drupal\text\Plugin\Field\FieldFormatter\TextTrimmedFormatter.

Class

TextTrimmedFormatter
Plugin implementation of the 'text_trimmed' formatter.

Namespace

Drupal\text\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = array();
  $summary[] = t('Trimmed limit: @trim_length characters', array(
    '@trim_length' => $this
      ->getSetting('trim_length'),
  ));
  return $summary;
}