function Section::appendComponent
Appends a component to the end of a region.
Parameters
\Drupal\layout_builder\SectionComponent $component: The component being appended.
Return value
$this
1 call to Section::appendComponent()
- Section::insertComponent in core/
modules/ layout_builder/ src/ Section.php - Inserts a component at a specified delta.
File
-
core/
modules/ layout_builder/ src/ Section.php, line 236
Class
- Section
- Provides a domain object for layout sections.
Namespace
Drupal\layout_builderCode
public function appendComponent(SectionComponent $component) {
$component->setWeight($this->getNextHighestWeight($component->getRegion()));
$this->setComponent($component);
return $this;
}