protected function LayoutBuilderEntityViewDisplay::getDefaultRegion in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::getDefaultRegion()
- 9 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::getDefaultRegion()
Gets the default region.
Return value
string The default region for this display.
Overrides EntityDisplayBase::getDefaultRegion
File
- core/modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplay.php, line 234 
Class
- LayoutBuilderEntityViewDisplay
- Provides an entity view display entity that has a layout.
Namespace
Drupal\layout_builder\EntityCode
protected function getDefaultRegion() {
  if ($this
    ->hasSection(0)) {
    return $this
      ->getSection(0)
      ->getDefaultRegion();
  }
  return parent::getDefaultRegion();
}