You are here

public function FontawesomeIconpicker::settingsSummary in Font Awesome Iconpicker 8

Same name in this branch
  1. 8 src/Plugin/Field/FieldFormatter/FontawesomeIconpicker.php \Drupal\fontawesome_iconpicker\Plugin\Field\FieldFormatter\FontawesomeIconpicker::settingsSummary()
  2. 8 src/Plugin/Field/FieldWidget/FontawesomeIconpicker.php \Drupal\fontawesome_iconpicker\Plugin\Field\FieldWidget\FontawesomeIconpicker::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/FontawesomeIconpicker.php, line 53

Class

FontawesomeIconpicker
Plugin implementation of the 'fontawesome_iconpicker' formatter.

Namespace

Drupal\fontawesome_iconpicker\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = array();

  // Implement settings summary.
  $summary[] = t('Size: @size', [
    '@size' => $this
      ->getFaIconSizeLabel($this
      ->getSetting('size')),
  ]);
  return $summary;
}