public static function BgImageFormatter::defaultSettings in Background Images Formatter 8
Same name and namespace in other branches
- 8.3 src/Plugin/Field/FieldFormatter/BgImageFormatter.php \Drupal\bg_image_formatter\Plugin\Field\FieldFormatter\BgImageFormatter::defaultSettings()
- 8.2 src/Plugin/Field/FieldFormatter/BgImageFormatter.php \Drupal\bg_image_formatter\Plugin\Field\FieldFormatter\BgImageFormatter::defaultSettings()
Defines the default settings for this plugin.
Return value
array A list of default settings, keyed by the setting name.
Overrides ImageFormatter::defaultSettings
2 calls to BgImageFormatter::defaultSettings()
- BgImageFormatter::getBackgroundImageCss in src/
Plugin/ Field/ FieldFormatter/ BgImageFormatter.php - Function taken from the module 'bg_image'.
- BgImageFormatter::mergeDefaults in src/
Plugin/ Field/ FieldFormatter/ BgImageFormatter.php - Merges default settings values into $settings.
File
- src/
Plugin/ Field/ FieldFormatter/ BgImageFormatter.php, line 125
Class
- BgImageFormatter
- Class BgImageFormatter.
Namespace
Drupal\bg_image_formatter\Plugin\Field\FieldFormatterCode
public static function defaultSettings() {
return [
'image_style' => '',
'css_settings' => [
'bg_image_selector' => 'body',
'bg_image_color' => '#FFFFFF',
'bg_image_x' => 'left',
'bg_image_y' => 'top',
'bg_image_attachment' => 'scroll',
'bg_image_repeat' => 'no-repeat',
'bg_image_background_size' => '',
'bg_image_background_size_ie8' => 0,
'bg_image_gradient' => '',
'bg_image_media_query' => 'all',
'bg_image_important' => 1,
'bg_image_z_index' => 'auto',
'bg_image_path_format' => 'absolute',
],
];
}