You are here

public function LayoutParagraphsComponent::getSettings in Layout Paragraphs 2.0.x

Returns the layout paragraph's behavior settings.

Return value

array The settings array.

2 calls to LayoutParagraphsComponent::getSettings()
LayoutParagraphsComponent::getSetting in src/LayoutParagraphsComponent.php
Returns a single layout paragraph setting.
LayoutParagraphsSection::getLayoutId in src/LayoutParagraphsSection.php
Returns the layout plugin id.

File

src/LayoutParagraphsComponent.php, line 154

Class

LayoutParagraphsComponent
Provides a domain object for a single Layout Paragraphs Component.

Namespace

Drupal\layout_paragraphs

Code

public function getSettings() {
  $behaviors_settings = $this->paragraph
    ->getAllBehaviorSettings();
  $layout_behavior_settings = $behaviors_settings['layout_paragraphs'] ?? [];
  $defaults = $this
    ->defaultSettings();
  return $layout_behavior_settings + $defaults;
}