You are here

public function MenuLinkFormatter::settingsSummary in Menu Link (Field) 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Field/FieldFormatter/MenuLinkFormatter.php \Drupal\menu_link\Plugin\Field\FieldFormatter\MenuLinkFormatter::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

src/Plugin/Field/FieldFormatter/MenuLinkFormatter.php, line 104

Class

MenuLinkFormatter
Plugin implementation of the 'menu_link' formatter.

Namespace

Drupal\menu_link\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  if ($this
    ->getSetting('link_to_target')) {
    $summary[] = $this
      ->t('Link enabled');
  }
  return $summary;
}