You are here

public static function GeneralImageFormatter::defaultSettings in Formatter Suite 8

Defines the default settings for this plugin.

Return value

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

Overrides ImageFormatter::defaultSettings

1 call to GeneralImageFormatter::defaultSettings()
GeneralImageFormatter::sanitizeSettings in src/Plugin/Field/FieldFormatter/GeneralImageFormatter.php
Sanitize settings to insure that they are safe and valid.

File

src/Plugin/Field/FieldFormatter/GeneralImageFormatter.php, line 195

Class

GeneralImageFormatter
Formats an image.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return array_merge([
    'captionLocation' => 'none',
    'captionIncludeTitle' => FALSE,
    'captionIncludeFilename' => FALSE,
    'captionIncludeSize' => FALSE,
    'captionIncludeDimensions' => FALSE,
    'captionIncludeMime' => FALSE,
    'classes' => '',
    'openLinkIn' => '_self',
  ], parent::defaultSettings());

  // Parent adds:
  // - image_style: the image style name.
  // - image_link: whether what to link the image to.
  //
  // This formatter uses the same two values, for compatability, but
  // presents a better UI.
}