You are here

public function ElementClassTrait::elementClassSettingsSummary in Element Class Formatter 8

Text for settings summary.

Parameters

array $summary: The original summary array.

string $class: The class string.

Return value

array The updated summary array.

7 calls to ElementClassTrait::elementClassSettingsSummary()
ElementEntityClassTrait::settingsSummary in src/Plugin/Field/FieldFormatter/ElementEntityClassTrait.php
ElementLinkClassTrait::settingsSummary in src/Plugin/Field/FieldFormatter/ElementLinkClassTrait.php
ElementListClassTrait::settingsSummary in src/Plugin/Field/FieldFormatter/ElementListClassTrait.php
EntityReferenceLabelClassFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/EntityReferenceLabelClassFormatter.php
Returns a short summary for the current formatter settings.
FileLinkClassFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FileLinkClassFormatter.php
Returns a short summary for the current formatter settings.

... See full list

File

src/Plugin/Field/FieldFormatter/ElementClassTrait.php, line 66

Class

ElementClassTrait
Trait ElementClassTrait.

Namespace

Drupal\element_class_formatter\Plugin\Field\FieldFormatter

Code

public function elementClassSettingsSummary(array $summary, $class) {
  if ($class) {
    $summary[] = $this
      ->t('Element class: @class', [
      '@class' => $class,
    ]);
  }
  return $summary;
}