function DefaultsSectionStorage::getEntityTypes
Same name in other branches
- 9 core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage::getEntityTypes()
- 8.9.x core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage::getEntityTypes()
- 11.x core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage::getEntityTypes()
Returns an array of relevant entity types.
Return value
\Drupal\Core\Entity\EntityTypeInterface[] An array of entity types.
1 call to DefaultsSectionStorage::getEntityTypes()
- DefaultsSectionStorage::buildRoutes in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ DefaultsSectionStorage.php - Provides the routes needed for Layout Builder UI.
File
-
core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ DefaultsSectionStorage.php, line 221
Class
- DefaultsSectionStorage
- Defines the 'defaults' 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->get('field_ui_base_route');
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.