You are here

public function LanguagefieldFlagFormatter::settingsSummary in Flags 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 LanguageFormatter::settingsSummary

File

flags_languagefield/src/Plugin/Field/FieldFormatter/LanguagefieldFlagFormatter.php, line 51

Class

LanguagefieldFlagFormatter
Plugin implementation of the 'languagefield_flag' formatter.

Namespace

Drupal\flags_languagefield\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $format = $this
    ->getSetting('flag_display');
  $formats = $this
    ->getOutputFormats();
  $summary[] = $formats[$format];
  return $summary;
}