You are here

public function FotoramaGalleryFormatter::settingsSummary in Fotorama Gallery 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/FotoramaGalleryFormatter.php \Drupal\fotorama_gallery\Plugin\Field\FieldFormatter\FotoramaGalleryFormatter::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 ImageFormatter::settingsSummary

File

src/Plugin/Field/FieldFormatter/FotoramaGalleryFormatter.php, line 169

Class

FotoramaGalleryFormatter
Plugin implementation of the 'fotorama_gallery display' formatter.

Namespace

Drupal\fotorama_gallery\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary[] = "Fotorama Gallery Settings";
  $summary += parent::settingsSummary();

  // Specials fields.
  $value = $this
    ->getSetting('dimensions')['ratio'];
  if (!empty($value)) {
    $summary[] = $this
      ->t('data-ratio: @value', [
      '@value' => $value,
    ]);
  }

  // Common fields.
  $this
    ->settingsSummarySelectsFields($summary);
  $this
    ->settingsSummaryNumberFields($summary);
  $this
    ->settingsSummaryCheckBoxFields($summary);
  return $summary;
}