function SectionStorageTrait::appendSection

3 calls to SectionStorageTrait::appendSection()
LayoutBuilderEntityViewDisplay::getDefaultSection in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Gets a default section.
SectionStorageTrait::addBlankSection in core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php
Adds a blank section to the list.
SectionStorageTrait::insertSection in core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php

File

core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php, line 67

Class

SectionStorageTrait
Provides a trait for storing sections on an object.

Namespace

Drupal\layout_builder\SectionStorage

Code

public function appendSection(Section $section) {
    $delta = $this->count();
    $this->setSection($delta, $section);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.