abstract protected function SectionListTrait::setSections in Drupal 10
Same name and namespace in other branches
- 9 core/modules/layout_builder/src/SectionListTrait.php \Drupal\layout_builder\SectionListTrait::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
3 methods override SectionListTrait::setSections()
- LayoutBuilderEntityViewDisplay::setSections in core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplay.php - Stores the information for all sections.
- LayoutSectionItemList::setSections in core/
modules/ layout_builder/ src/ Field/ LayoutSectionItemList.php - Stores the information for all sections.
- SimpleConfigSectionStorage::setSections in core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ SectionStorage/ SimpleConfigSectionStorage.php - Stores the information for all sections.
File
- core/
modules/ layout_builder/ src/ SectionListTrait.php, line 23
Class
- SectionListTrait
- Provides a trait for maintaining a list of sections.
Namespace
Drupal\layout_builderCode
protected abstract function setSections(array $sections);