You are here

public function Section::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::__construct()

Constructs a new Section.

Parameters

string $layout_id: The layout plugin ID.

array $layout_settings: (optional) The layout plugin settings.

\Drupal\layout_builder\SectionComponent[] $components: (optional) The components.

array[] $third_party_settings: (optional) Any third party settings.

File

core/modules/layout_builder/src/Section.php, line 63

Class

Section
Provides a domain object for layout sections.

Namespace

Drupal\layout_builder

Code

public function __construct($layout_id, array $layout_settings = [], array $components = [], array $third_party_settings = []) {
  $this->layoutId = $layout_id;
  $this->layoutSettings = $layout_settings;
  foreach ($components as $component) {
    $this
      ->setComponent($component);
  }
  $this->thirdPartySettings = $third_party_settings;
}