You are here

public static function PdfDefault::defaultSettings in PDF 8

Defines the default settings for this plugin.

Return value

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

Overrides PluginSettingsBase::defaultSettings

File

src/Plugin/Field/FieldFormatter/PdfDefault.php, line 23

Class

PdfDefault
Plugin annotation @FieldFormatter( id = "pdf_default", label = @Translation("PDF: Default viewer of PDF.js"), description = @Translation("Use the default viewer like http://mozilla.github.io/pdf.js/web/viewer.html."), field_types = {"file"} )

Namespace

Drupal\pdf\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'keep_pdfjs' => TRUE,
    'width' => '100%',
    'height' => '',
    'page' => NULL,
    'zoom' => NULL,
    'custom_zoom' => NULL,
    'pagemode' => NULL,
  ] + parent::defaultSettings();
}