function LayoutSectionItemList::getSections
Gets the layout sections.
Return value
\Drupal\layout_builder\Section[] A sequentially and numerically keyed array of section objects.
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.