function LayoutSectionItemList::getSections
Same name in other branches
- 9 core/modules/layout_builder/src/Field/LayoutSectionItemList.php \Drupal\layout_builder\Field\LayoutSectionItemList::getSections()
- 8.9.x core/modules/layout_builder/src/Field/LayoutSectionItemList.php \Drupal\layout_builder\Field\LayoutSectionItemList::getSections()
- 11.x core/modules/layout_builder/src/Field/LayoutSectionItemList.php \Drupal\layout_builder\Field\LayoutSectionItemList::getSections()
Overrides SectionListInterface::getSections
File
-
core/
modules/ layout_builder/ src/ Field/ LayoutSectionItemList.php, line 35
Class
- LayoutSectionItemList
- Defines an item list class for layout section fields.
Namespace
Drupal\layout_builder\FieldCode
public function getSections() {
$sections = [];
foreach ($this->list as $delta => $item) {
$sections[$delta] = $item->section;
}
return $sections;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.