You are here

public function FieldGroupFormatterBase::settingsSummary in Field Group 8

Same name and namespace in other branches
  1. 8.3 src/FieldGroupFormatterBase.php \Drupal\field_group\FieldGroupFormatterBase::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

array() A short summary of the formatter settings.

Overrides FieldGroupFormatterInterface::settingsSummary

3 calls to FieldGroupFormatterBase::settingsSummary()
Fieldset::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/Fieldset.php
Returns a short summary for the current formatter settings.
HtmlElement::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php
Returns a short summary for the current formatter settings.
Tabs::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/Tabs.php
Returns a short summary for the current formatter settings.
6 methods override FieldGroupFormatterBase::settingsSummary()
Accordion::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/Accordion.php
Returns a short summary for the current formatter settings.
AccordionItem::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php
Returns a short summary for the current formatter settings.
Details::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/Details.php
Returns a short summary for the current formatter settings.
Fieldset::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/Fieldset.php
Returns a short summary for the current formatter settings.
HtmlElement::settingsSummary in src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php
Returns a short summary for the current formatter settings.

... See full list

File

src/FieldGroupFormatterBase.php, line 115

Class

FieldGroupFormatterBase
Base class for 'Fieldgroup formatter' plugin implementations.

Namespace

Drupal\field_group

Code

public function settingsSummary() {
  $summary = array();
  if ($this
    ->getSetting('formatter')) {
    $summary[] = $this->pluginDefinition['label'] . ': ' . $this
      ->getSetting('formatter');
  }
  if ($this
    ->getSetting('id')) {
    $summary[] = $this
      ->t('Id: @id', array(
      '@id' => $this
        ->getSetting('id'),
    ));
  }
  if ($this
    ->getSetting('classes')) {
    $summary[] = \Drupal::translation()
      ->translate('Extra CSS classes: @classes', array(
      '@classes' => $this
        ->getSetting('classes'),
    ));
  }
  return $summary;
}