You are here

private function FileDownloadFieldFormatter::getDisplayOptions in File Download 8

Return value

array

2 calls to FileDownloadFieldFormatter::getDisplayOptions()
FileDownloadFieldFormatter::settingsForm in src/Plugin/Field/FieldFormatter/FileDownloadFieldFormatter.php
Returns a form to configure settings for the formatter.
FileDownloadFieldFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FileDownloadFieldFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/FileDownloadFieldFormatter.php, line 74

Class

FileDownloadFieldFormatter
Plugin annotation @FieldFormatter( id = "file_download_formatter", label = @Translation("File Download"), field_types = { "file", "image" } )

Namespace

Drupal\file_download\Plugin\Field\FieldFormatter

Code

private function getDisplayOptions() {
  return [
    'file' => $this
      ->t('Title of file'),
    'entity_title' => $this
      ->t('Title of parent entity'),
    'description' => $this
      ->t('Contents of the description field'),
    'empty' => $this
      ->t('Nothing'),
    'custom' => $this
      ->t('Custom text'),
  ];
}