You are here

protected function SimpleConfigSectionStorage::setSections in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage::setSections()
  2. 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage::setSections()

Stores the information for all sections.

Implementations of this method are expected to call array_values() to rekey the list of sections.

Parameters

\Drupal\layout_builder\Section[] $sections: An array of section objects.

Return value

$this

Overrides SectionListTrait::setSections

1 call to SimpleConfigSectionStorage::setSections()
SimpleConfigSectionStorage::getSections in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
Gets the layout sections.

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php, line 115

Class

SimpleConfigSectionStorage
Provides section storage utilizing simple config.

Namespace

Drupal\layout_builder_test\Plugin\SectionStorage

Code

protected function setSections(array $sections) {
  $this->sections = array_values($sections);
  return $this;
}