protected function SectionListTrait::hasSection in Drupal 9
Same name and namespace in other branches
- 10 core/modules/layout_builder/src/SectionListTrait.php \Drupal\layout_builder\SectionListTrait::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 SectionListTrait::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.
- SectionListTrait::addBlankSection in core/
modules/ layout_builder/ src/ SectionListTrait.php - Adds a blank section to the list.
- SectionListTrait::getSection in core/
modules/ layout_builder/ src/ SectionListTrait.php - SectionListTrait::hasBlankSection in core/
modules/ layout_builder/ src/ SectionListTrait.php - Indicates if this section list contains a blank section.
File
- core/
modules/ layout_builder/ src/ SectionListTrait.php, line 168
Class
- SectionListTrait
- Provides a trait for maintaining a list of sections.
Namespace
Drupal\layout_builderCode
protected function hasSection($delta) {
return isset($this
->getSections()[$delta]);
}