public function OverridesSectionStorage::getDefaultSectionStorage in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getDefaultSectionStorage()
- 10 core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getDefaultSectionStorage()
Returns the corresponding defaults section storage for this override.
@todo Determine if this method needs a parameter in https://www.drupal.org/project/drupal/issues/2907413.
Return value
\Drupal\layout_builder\DefaultsSectionStorageInterface The defaults section storage.
Overrides OverridesSectionStorageInterface::getDefaultSectionStorage
1 call to OverridesSectionStorage::getDefaultSectionStorage()
- OverridesSectionStorage::isApplicable in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php - Determines if this section storage is applicable for the current contexts.
File
- core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php, line 287
Class
- OverridesSectionStorage
- Defines the 'overrides' section storage type.
Namespace
Drupal\layout_builder\Plugin\SectionStorageCode
public function getDefaultSectionStorage() {
$display = LayoutBuilderEntityViewDisplay::collectRenderDisplay($this
->getEntity(), $this
->getContextValue('view_mode'));
return $this->sectionStorageManager
->load('defaults', [
'display' => EntityContext::fromEntity($display),
]);
}