You are here

public function CshsFullHierarchyFormatter::settingsSummary in Client-side Hierarchical Select 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/Field/FieldFormatter/CshsFullHierarchyFormatter.php \Drupal\cshs\Plugin\Field\FieldFormatter\CshsFullHierarchyFormatter::settingsSummary()
  2. 8.2 src/Plugin/Field/FieldFormatter/CshsFullHierarchyFormatter.php \Drupal\cshs\Plugin\Field\FieldFormatter\CshsFullHierarchyFormatter::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 CshsFormatterBase::settingsSummary

File

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

Class

CshsFullHierarchyFormatter
Plugin implementation of the "Full hierarchy" formatter.

Namespace

Drupal\cshs\Plugin\Field\FieldFormatter

Code

public function settingsSummary() : array {
  $summary = parent::settingsSummary();
  $separator = $this
    ->getSetting('separator');
  $summary[] = $this
    ->t('Separator: @separator', [
    '@separator' => empty($separator) ? $this
      ->t('None') : $separator,
  ]);
  return $summary;
}