You are here

public function TwitterEmbedFormatter::settingsSummary in Media entity Twitter 8.2

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/TwitterEmbedFormatter.php, line 52

Class

TwitterEmbedFormatter
Plugin implementation of the 'twitter_embed' formatter.

Namespace

Drupal\media_entity_twitter\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  if ($this
    ->getSetting('conversation')) {
    $summary[] = $this
      ->t('Show previous tweet, if applicable.');
  }
  else {
    $summary[] = $this
      ->t('Do not show previous tweet, if applicable.');
  }
  return $summary;
}