Closed (fixed)
Project:
Display Builder
Version:
1.0.x-dev
Component:
display_builder_entity_view
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Jun 2026 at 11:55 UTC
Updated:
22 Jun 2026 at 13:45 UTC
Jump to comment: Most recent
Comments
Comment #2
pdureau commentedComment #4
pdureau commentedit looks good so far...
Comment #5
pdureau commentedAlso tested locally, by clicking around in UI, and doing all kind of imports from Manage Display and Layout Builder.
Comment #6
pdureau commentedAs a follow-up, we may be avle to totally remove the
EntityViewDisplayVSLayoutBuilderEntityViewDisplaysplit (and hopefully theEntityViewDisplayFormVSLayoutBuilderEntityViewDisplayFormsplit).We keep 2 different classes with explicit reference to Layout Builder because of the classes we are extending from Core:
LayoutBuilderEntityViewDisplayis extendingDrupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayinstead ofDrupal\Core\Entity\Entity\EntityViewDisplayLayoutBuilderEntityViewDisplayFormis extendingDrupal\layout_builder\Form\LayoutBuilderEntityViewDisplayForminstead ofDrupal\field_ui\Form\EntityViewDisplayEditFormCan we promote composition over inheritance?
EntityViewDisplayTraitEntityInterface::preSave()which could be replaced byhook_entity_presavewith conditionsEntityInterface::postSave()???EntityInterface::delete()could be replaced byhook_entity_delete?ConfigEntityInterface::calculateDependencies()andConfigEntityInterface::onDependencyRemoval()may be addressable with #3540069: Evaluate ObjectWithPluginCollectionInterfaceEntityViewDisplayInterface::buildMultiple()could be replaced byhook_entity_viewDisplayBuilderEntityDisplayInterface::isDisplayBuilderEnabled()to move to buildable pluginDisplayBuilderEntityDisplayInterface::getDisplayBuilderOverrideField()to move to buildable pluginDisplayBuilderEntityDisplayInterface::getDisplayBuilderOverrideProfile()to move to buildable pluginDisplayBuilderEntityDisplayInterface::isDisplayBuilderOverridable()to move to buildable pluginWe already implements
hook_entity_delete, we can gather all hook implementations which is altering Entity View Display entity type into a single class which will look very similar to the currentEntityViewDisplayTrait. Like an "entity type decorator"For forms:
EntityViewDisplayFormTraitentiity_form_alterhook.EntityViewDisplayFormTraitonly overridesFormInterface::submitForm()I will create the ticket once this one is merged.
Comment #8
mogtofu33 commentedComment #10
pdureau commentedThanks. Follow-up #3594228: Remove explicit references to Layout Builder