You are here

public static function SvgImageFieldItem::defaultFieldSettings in SVG Image Field 2.1.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldType/SvgImageFieldItem.php \Drupal\svg_image_field\Plugin\Field\FieldType\SvgImageFieldItem::defaultFieldSettings()
  2. 2.0.x src/Plugin/Field/FieldType/SvgImageFieldItem.php \Drupal\svg_image_field\Plugin\Field\FieldType\SvgImageFieldItem::defaultFieldSettings()

Defines the field-level settings for this plugin.

Return value

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

Overrides FileItem::defaultFieldSettings

File

src/Plugin/Field/FieldType/SvgImageFieldItem.php, line 67

Class

SvgImageFieldItem
Plugin implementation of the 'svg_image' field type.

Namespace

Drupal\svg_image_field\Plugin\Field\FieldType

Code

public static function defaultFieldSettings() {
  $settings = [
    'file_extensions' => 'svg',
    'alt_field' => 1,
    'alt_field_required' => 1,
    'title_field' => 0,
    'title_field_required' => 0,
    'default_image' => [
      'uuid' => NULL,
      'alt' => '',
      'title' => '',
    ],
  ] + parent::defaultFieldSettings();
  unset($settings['description_field']);
  return $settings;
}