You are here

public static function BgImgItem::defaultFieldSettings in Background Image Field 8

Defines the field-level settings for this plugin.

Return value

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

Overrides ImageItem::defaultFieldSettings

File

src/Plugin/Field/FieldType/BgImgItem.php, line 58

Class

BgImgItem
Plugin implementation of the 'bg_img_field' field type.

Namespace

Drupal\bg_img_field\Plugin\Field\FieldType

Code

public static function defaultFieldSettings() {
  $settings = parent::defaultFieldSettings();

  // Change value of setting  set in image field.
  $settings['file_extensions'] = "png jpg jpeg svg";
  $settings['alt_field'] = 0;
  $settings['alt_field_required'] = 0;

  // Add the specific css settings.
  $settings['css_settings']['css_selector'] = '';
  $settings['css_settings']['css_repeat'] = 'inherit';
  $settings['css_settings']['css_background_size'] = 'inherit';
  $settings['css_settings']['css_background_position'] = 'inherit';
  return $settings;
}