Problem/Motivation
When enabled the layout_builder module seize the display for an entity and replace it's fields with derived blocks. For normal fields it offers the posibility to edit the field display instance, but for extra fields since by design they are not configurable from the UI it does not, making us unable to configure any extra field added by this module (if the plugin allow so).
Proposed solution
When enabled along with the layout_builder module, extend the latter ExtraFieldBlock class and replace it with one provided by this module which will ensure those extra fields created using plugins can be properly configured through the block.
Remaining tasks
Create an ExtraFieldBlock extending the one provided by layout_builder module.Implementhook_block_alterand replace the class for the extra_field_block plugin with the latter.- Update the records
User interface changes
None
| Comment | File | Size | Author |
|---|
Comments
Comment #2
d70rr3s commentedComment #4
d70rr3s commentedUntil other issues may come by, let's consider this as fixed.
Comment #5
nikita_ttI noticed an error here broken line
Comment #6
d70rr3s commentedAh yes, I should be using list construct instead unpacking directly into vars (+7.1). Marked as NW to support <7.1. Thanks @nikita_tt.
Comment #7
d70rr3s commentedComment #9
d70rr3s commentedComment #10
jienckebd commentedWhen saving a layout_builder display, efs_entity_presave() attaches efs blocks from other displays of the same entity type / bundle. So the efs block from another bundle is added each time layout builder form is saved. Not sure why, but this patch seems to fix it.
Please let me know if I'm missing something.
Comment #11
d70rr3s commentedHi @jienckebd thanks for reporting this, moving into a separate issue since needs a follow up because we may want to use EFS withing layout builder displays. I'm closing this since the may main goal was to EFS be available as a block to be placed by Layout Builder and is completed.