LayoutEntityHelperTrait
trait LayoutEntityHelperTrait (View source)
Methods to help with entities using the layout builder.
Properties
| protected SectionStorageManagerInterface | $sectionStorageManager | The section storage manager. |
Methods
Gets revision IDs for layout sections.
Gets components that have Inline Block plugins.
Determines if the original entity used the default section storage.
Details
protected bool
isLayoutCompatibleEntity(EntityInterface $entity)
Determines if an entity can have a layout.
protected int[]
getInlineBlockRevisionIdsInSections(array $sections)
Gets revision IDs for layout sections.
protected Section[]
getEntitySections(EntityInterface $entity)
Gets the sections for an entity if any.
protected SectionComponent[]
getInlineBlockComponents(array $sections)
Gets components that have Inline Block plugins.
protected SectionStorageInterface|null
getSectionStorageForEntity(EntityInterface $entity)
Gets the section storage for an entity.
protected bool
originalEntityUsesDefaultStorage(EntityInterface $entity)
Determines if the original entity used the default section storage.
This method can be used during the entity save process to determine whether $entity->original is set and used the default section storage plugin as determined by ::getSectionStorageForEntity().