protected function LayoutEntityHelperTrait::isLayoutCompatibleEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/src/LayoutEntityHelperTrait.php \Drupal\layout_builder\LayoutEntityHelperTrait::isLayoutCompatibleEntity()
- 10 core/modules/layout_builder/src/LayoutEntityHelperTrait.php \Drupal\layout_builder\LayoutEntityHelperTrait::isLayoutCompatibleEntity()
Determines if an entity can have a layout.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to check.
Return value
bool TRUE if the entity can have a layout otherwise FALSE.
2 calls to LayoutEntityHelperTrait::isLayoutCompatibleEntity()
- InlineBlockEntityOperations::handlePreSave in core/
modules/ layout_builder/ src/ InlineBlockEntityOperations.php - Handles saving a parent entity.
- SetInlineBlockDependency::getInlineBlockDependency in core/
modules/ layout_builder/ src/ EventSubscriber/ SetInlineBlockDependency.php - Get the access dependency of an inline block.
File
- core/
modules/ layout_builder/ src/ LayoutEntityHelperTrait.php, line 37
Class
- LayoutEntityHelperTrait
- Methods to help with entities using the layout builder.
Namespace
Drupal\layout_builderCode
protected function isLayoutCompatibleEntity(EntityInterface $entity) {
return $this
->getSectionStorageForEntity($entity) !== NULL;
}