You are here

public static function PDFPreviewFormatter::defaultSettings in PDFPreview 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Field/FieldFormatter/PdfPreviewFormatter.php \Drupal\pdfpreview\Plugin\Field\FieldFormatter\PdfPreviewFormatter::defaultSettings()

Defines the default settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides ImageFormatter::defaultSettings

File

src/Plugin/Field/FieldFormatter/PDFPreviewFormatter.php, line 92

Class

PDFPreviewFormatter
Plugin implementation of the 'pdfpreview' formatter.

Namespace

Drupal\pdfpreview\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  $config = \Drupal::config('pdfpreview.settings');
  return [
    'show_description' => $config
      ->get('show_description'),
    'tag' => $config
      ->get('tag'),
    'fallback_formatter' => $config
      ->get('fallback_formatter'),
  ] + parent::defaultSettings();
}