You are here

public function ColorFieldTextFormatter::settingsSummary in Color Field 8

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/ColorFieldTextFormatter.php, line 68
Contains Drupal\color_field\Plugin\Field\FieldFormatter\ColorFieldTextFormatter.

Class

ColorFieldTextFormatter
Plugin implementation of the 'color_field_swatch' formatter.

Namespace

Drupal\color_field\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = array();
  $format = $this
    ->getSetting('format');
  $summary[] = t('Format: @format', array(
    '@format' => $this
      ->getColorFormat($format),
  ));
  return $summary;
}