function SectionStorageTrait::hasSection
Indicates if there is a section at the specified delta.
Parameters
int $delta: The delta of the section.
Return value
bool TRUE if there is a section for this delta, FALSE otherwise.
6 calls to SectionStorageTrait::hasSection()
- LayoutBuilderEntityViewDisplay::getDefaultRegion in core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplay.php - Gets the default region.
- 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::getSection in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php - SectionStorageTrait::hasBlankSection in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php - Indicates if this section list contains a blank section.
File
-
core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageTrait.php, line 168
Class
- SectionStorageTrait
- Provides a trait for storing sections on an object.
Namespace
Drupal\layout_builder\SectionStorageCode
protected function hasSection($delta) {
return isset($this->getSections()[$delta]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.