protected function OverridesSectionStorage::getEntityTypes in Drupal 8
Same name and namespace in other branches
- 9 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 313
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');
});
}