You are here

public function SkypeButtonFormatter::settingsSummary in Skype 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/SkypeButtonFormatter.php, line 102

Class

SkypeButtonFormatter
Plugin implementation of the 'skype_button' formatter.

Namespace

Drupal\skype\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $settings = $this
    ->getSettings();
  $actions = array_filter($settings['actions']);
  $summary[] = t('Button action(s): @actions', [
    '@actions' => implode(', ', $actions),
  ]);
  $summary[] = t('Button color: @color', [
    '@color' => $settings['image_color'],
  ]);
  $summary[] = t('Button size: @sizepx', [
    '@size' => $settings['image_size'],
  ]);
  return $summary;
}