You are here

public static function PdfPreviewFormatter::defaultSettings in PDFPreview 2.0.x

Same name and namespace in other branches
  1. 8 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();
}