You are here

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

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

2 calls to CshsFormatterBase::settingsSummary()
CshsFlexibleHierarchyFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/CshsFlexibleHierarchyFormatter.php
Returns a short summary for the current formatter settings.
CshsFullHierarchyFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/CshsFullHierarchyFormatter.php
Returns a short summary for the current formatter settings.
2 methods override CshsFormatterBase::settingsSummary()
CshsFlexibleHierarchyFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/CshsFlexibleHierarchyFormatter.php
Returns a short summary for the current formatter settings.
CshsFullHierarchyFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/CshsFullHierarchyFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/CshsFormatterBase.php, line 54

Class

CshsFormatterBase
Base formatter for CSHS field.

Namespace

Drupal\cshs\Plugin\Field\FieldFormatter

Code

public function settingsSummary() : array {
  $summary = [];
  $summary[] = $this
    ->t('Linked to term page: @linked', [
    '@linked' => $this
      ->getSetting('linked') ? $this
      ->t('Yes') : $this
      ->t('No'),
  ]);
  $summary[] = $this
    ->t('Reverse order view: @reverse', [
    '@reverse' => $this
      ->getSetting('reverse') ? $this
      ->t('Yes') : $this
      ->t('No'),
  ]);
  return $summary;
}