This is dependent upon #1927608: Remove the tight coupling between Block Plugins and Block Entities
Currently the block form expects to have the entity available in it. Since there's an Entity Form Controller wrapping it, we can't do anything about that, but entities are just one of many potentially acceptable ways a block form could be exposed, and the plugin internals can not be made to expect an entity.
In this process we should move concepts that don't serve the block plugin to the Entity Form Controller. This includes, but is not limited to:
- The entity id mechanism
- The region the block appears in
- potentially the visibility settings of the block (though that should probably be a follow up that uses conditions)
ToDO
#1871696: Convert block instances to configuration entities to resolve architectural issues change notice
Comment | File | Size | Author |
---|---|---|---|
#2 | 1941948-2.patch | 5.72 KB | EclipseGc |
#2 | 1941948-2-full.patch | 47.27 KB | EclipseGc |
Comments
Comment #1
EclipseGc CreditAttribution: EclipseGc commentedComment #1.0
EclipseGc CreditAttribution: EclipseGc commentedadding parent issue
Comment #2
EclipseGc CreditAttribution: EclipseGc commentedThe non-full version of this patch might actually pass, I don't know of a reason it couldn't, but since #1927608: Remove the tight coupling between Block Plugins and Block Entities has stalled I've gone ahead and moved forward with the approach in the followups since I'm happy with my latest patch in that issue.
This patch moves region, id and machine_name out of the BlockBase::form() method and moves it into the BlockFormController. This should clearly separate the form components that are the entity's responsibility and actually open up the entity to doing more if it's deemed relevant/necessary.
Eclipse
Comment #3
EclipseGc CreditAttribution: EclipseGc commentedThe full version has a comment inside of the display entity stuff that wasn't meant to be here but shouldn't affect functionality. I'll make sure it's not in the next patch.
Comment #4
EclipseGc CreditAttribution: EclipseGc commentedComment #5
effulgentsia CreditAttribution: effulgentsia commentedAFAICT, this has been fully incorporated into #1927608: Remove the tight coupling between Block Plugins and Block Entities.
Comment #5.0
effulgentsia CreditAttribution: effulgentsia commentedUpdated issue summary.