You are here

public function FileDownloadUriFieldFormatter::settingsSummary in File Download 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/FileDownloadUriFieldFormatter.php, line 51

Class

FileDownloadUriFieldFormatter
Plugin implementation of the "file_download_uri_formatter" formatter.

Namespace

Drupal\file_download\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $settings = $this
    ->getSettings();
  if ($settings['absolute_url']) {
    $summary[] = $this
      ->t('Absolute URL');
  }
  return $summary;
}