You are here

public static function SvgResponsiveImageFormatter::defaultSettings in Svg Image 2.x

Same name and namespace in other branches
  1. 8 modules/svg_image_responsive/src/Plugin/Field/FieldFormatter/SvgResponsiveImageFormatter.php \Drupal\svg_image_responsive\Plugin\Field\FieldFormatter\SvgResponsiveImageFormatter::defaultSettings()
  2. 1.x modules/svg_image_responsive/src/Plugin/Field/FieldFormatter/SvgResponsiveImageFormatter.php \Drupal\svg_image_responsive\Plugin\Field\FieldFormatter\SvgResponsiveImageFormatter::defaultSettings()

Defines the default settings for this plugin.

Return value

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

Overrides ResponsiveImageFormatter::defaultSettings

File

modules/svg_image_responsive/src/Plugin/Field/FieldFormatter/SvgResponsiveImageFormatter.php, line 192

Class

SvgResponsiveImageFormatter
Plugin implementation of the 'responsive_image' formatter.

Namespace

Drupal\svg_image_responsive\Plugin\Field\FieldFormatter

Code

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