function OverridesSectionStorage::getEntityTypes
Same name in other branches
- 8.9.x core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getEntityTypes()
- 10 core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getEntityTypes()
- 11.x core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getEntityTypes()
Returns an array of relevant entity types.
Return value
\Drupal\Core\Entity\EntityTypeInterface[] An array of entity types.
2 calls to OverridesSectionStorage::getEntityTypes()
- OverridesSectionStorage::buildLocalTasks in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php - Provides the local tasks dynamically for Layout Builder plugins.
- OverridesSectionStorage::buildRoutes in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php - Provides the routes needed for Layout Builder UI.
File
-
core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php, line 278
Class
- OverridesSectionStorage
- Defines the 'overrides' section storage type.
Namespace
Drupal\layout_builder\Plugin\SectionStorageCode
protected function getEntityTypes() {
return array_filter($this->entityTypeManager
->getDefinitions(), function (EntityTypeInterface $entity_type) {
return $entity_type->entityClassImplements(FieldableEntityInterface::class) && $entity_type->hasHandlerClass('form', 'layout_builder') && $entity_type->hasViewBuilderClass() && $entity_type->hasLinkTemplate('canonical');
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.