You are here

public function CommentDefaultFormatter::settingsSummary in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentDefaultFormatter::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/comment/src/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php, line 222
Contains \Drupal\comment\Plugin\Field\FieldFormatter\CommentDefaultFormatter.

Class

CommentDefaultFormatter
Provides a default comment formatter.

Namespace

Drupal\comment\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {

  // Only show a summary if we're using a non-standard pager id.
  if ($this
    ->getSetting('pager_id')) {
    return array(
      $this
        ->t('Pager ID: @id', array(
        '@id' => $this
          ->getSetting('pager_id'),
      )),
    );
  }
  return array();
}