public function TextTrimmedFormatter::settingsSummary

Returns a short summary for the current formatter settings.

If an empty result is returned, the formatter is assumed to have no configurable settings, and no UI will be provided to display a settings form.

Return value

array() A short summary of the formatter settings.

Overrides FormatterBase::settingsSummary

File

drupal/core/modules/text/lib/Drupal/text/Plugin/field/formatter/TextTrimmedFormatter.php, line 59
Contains \Drupal\text\Plugin\field\formatter\TextTrimmedFormatter.

Class

TextTrimmedFormatter
Plugin implementation of the 'text_trimmed'' formatter.

Namespace

Drupal\text\Plugin\field\formatter

Code

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