You are here

protected function LayoutEntityHelperTrait::isLayoutCompatibleEntity in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/LayoutEntityHelperTrait.php \Drupal\layout_builder\LayoutEntityHelperTrait::isLayoutCompatibleEntity()
  2. 9 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.

1 call to LayoutEntityHelperTrait::isLayoutCompatibleEntity()
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 36

Class

LayoutEntityHelperTrait
Methods to help with entities using the layout builder.

Namespace

Drupal\layout_builder

Code

protected function isLayoutCompatibleEntity(EntityInterface $entity) {
  return $this
    ->getSectionStorageForEntity($entity) !== NULL;
}