protected function SectionStorageTrait::hasBlankSection in Drupal 8
Indicates if this section list contains a blank section.
A blank section is used to differentiate the difference between a layout that has never been instantiated and one that has purposefully had all sections removed.
Return value
bool TRUE if the section list contains a blank section, FALSE otherwise.
See also
\Drupal\layout_builder\Plugin\Layout\BlankLayout
3 calls to SectionStorageTrait::hasBlankSection()
- SectionStorageTrait::count in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php - SectionStorageTrait::insertSection in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php - SectionStorageTrait::removeSection in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php
File
- core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php, line 123
Class
- SectionStorageTrait
- Provides a trait for storing sections on an object.
Namespace
Drupal\layout_builder\SectionStorageCode
protected function hasBlankSection() {
// A blank section will only ever exist when the delta is 0, as added by
// ::removeSection().
return $this
->hasSection(0) && $this
->getSection(0)
->getLayoutId() === 'layout_builder_blank';
}