You are here

public function Details::settingsSummary in Double Field 8.3

Same name and namespace in other branches
  1. 4.x src/Plugin/Field/FieldFormatter/Details.php \Drupal\double_field\Plugin\Field\FieldFormatter\Details::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 Base::settingsSummary

File

src/Plugin/Field/FieldFormatter/Details.php, line 48

Class

Details
Plugin implementations for 'details' formatter.

Namespace

Drupal\double_field\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $open = $this
    ->getSetting('open');
  $summary[] = $this
    ->t('Open: @open', [
    '@open' => $open ? $this
      ->t('yes') : $this
      ->t('no'),
  ]);
  return array_merge($summary, parent::settingsSummary());
}