You are here

public static function SvgImageFormatter::defaultSettings in Svg Image 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldFormatter/SvgImageFormatter.php \Drupal\svg_image\Plugin\Field\FieldFormatter\SvgImageFormatter::defaultSettings()
  2. 1.x src/Plugin/Field/FieldFormatter/SvgImageFormatter.php \Drupal\svg_image\Plugin\Field\FieldFormatter\SvgImageFormatter::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/SvgImageFormatter.php, line 184

Class

SvgImageFormatter
Plugin implementation of the 'image' formatter.

Namespace

Drupal\svg_image\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'svg_attributes' => [
      'width' => '',
      'height' => '',
    ],
    'svg_render_as_image' => TRUE,
  ] + parent::defaultSettings();
}