You are here

protected function LayoutParagraphsWidget::setLayoutSettings in Layout Paragraphs 1.0.x

Sets the layout settings for a given paragraph.

Parameters

\Drupal\paragraphs\ParagraphInterface $paragraph: The paragraph entity.

array $layout_settings: An array of layout settings.

3 calls to LayoutParagraphsWidget::setLayoutSettings()
LayoutParagraphsWidget::massageFormValues in src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php
Massages the form values into the format expected for field values.
LayoutParagraphsWidget::saveItemSubmit in src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php
Form submit handler - saves an item.
LayoutParagraphsWidget::setLayoutSetting in src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php
Sets the layout settings for a given paragraph.

File

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

Class

LayoutParagraphsWidget
Entity Reference with Layout field widget.

Namespace

Drupal\layout_paragraphs\Plugin\Field\FieldWidget

Code

protected function setLayoutSettings(ParagraphInterface &$paragraph, array $layout_settings) {
  $paragraph
    ->setBehaviorSettings('layout_paragraphs', $layout_settings);
}