function SectionStorageTrait::setSection
Sets the section for the given delta on the display.
Parameters
int $delta: The delta of the section.
\Drupal\layout_builder\Section $section: The layout section.
Return value
$this
1 call to SectionStorageTrait::setSection()
- SectionStorageTrait::appendSection in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php
File
-
core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php, line 57
Class
- SectionStorageTrait
- Provides a trait for storing sections on an object.
Namespace
Drupal\layout_builder\SectionStorageCode
protected function setSection($delta, Section $section) {
$sections = $this->getSections();
$sections[$delta] = $section;
$this->setSections($sections);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.