You are here

public function LinkIframeFormatter::settingsSummary in Link iframe formatter 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldFormatter/LinkIframeFormatter.php \Drupal\link_iframe_formatter\Plugin\Field\FieldFormatter\LinkIframeFormatter::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 LinkFormatter::settingsSummary

File

src/Plugin/Field/FieldFormatter/LinkIframeFormatter.php, line 76

Class

LinkIframeFormatter
Plugin implementation of the 'link_iframe_formatter' formatter.

Namespace

Drupal\link_iframe_formatter\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = $this
    ->t('Width: @width, Height: @height, Class: @class, Original link is @original', [
    '@width' => $this
      ->getSetting('width'),
    '@height' => $this
      ->getSetting('height'),
    '@class' => $this
      ->getSetting('class') == "" ? 'None' : $this
      ->getSetting('class'),
    '@original' => $this
      ->getSetting('original') ? t('On') : t('Off'),
  ]);
  return $summary;
}