You are here

public static function LayoutParagraphsWidget::defaultSettings in Layout Paragraphs 2.0.x

Same name and namespace in other branches
  1. 1.0.x src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php \Drupal\layout_paragraphs\Plugin\Field\FieldWidget\LayoutParagraphsWidget::defaultSettings()

Default settings for widget.

Return value

array The default settings array.

Overrides PluginSettingsBase::defaultSettings

1 call to LayoutParagraphsWidget::defaultSettings()
LayoutParagraphsBuilderFormatter::defaultSettings in src/Plugin/Field/FieldFormatter/LayoutParagraphsBuilderFormatter.php
Replicates settings from Layout Paragraphs Widget.

File

src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php, line 241

Class

LayoutParagraphsWidget
Layout paragraphs widget.

Namespace

Drupal\layout_paragraphs\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  $defaults = parent::defaultSettings();
  $defaults += [
    'empty_message' => '',
    'preview_view_mode' => 'default',
    'nesting_depth' => 0,
    'require_layouts' => 0,
  ];
  return $defaults;
}