Problem/Motivation
For the sake of simplicity of altering the add/edit block forms, the form ids should be unified and set in the base class instead of the edit/add form class. Besides that it would be helpful to have page and display variant as whole objects in the form state available.
An example of where this will be useful can be found here: #2509142: Add support for page manager
Proposed resolution
Move getFormId() from sub classes to parent class DisplayVariantConfigureBlockFormBase and add page and display variant to form state in the buildForm() method of that class.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | unify-block-form-ids-2574871-6.interdiff.txt | 2.69 KB | s_leu |
| #6 | unify-block-form-ids-2574871-6.patch | 4.11 KB | s_leu |
| #2 | unify-block-form-ids-2574871-1.patch | 2.95 KB | s_leu |
Comments
Comment #2
s_leu commentedHere's a first patch.
Comment #4
tim.plunkettWhy not just use BaseFormIdInterface instead?
These are worrisome to me, we're just asking for trouble with serialization.
Comment #5
berdirI think we already end up caching those objects as they are passed in to the form? At least the page...
Comment #6
s_leu commentedApplied change as mentioned in 1. of #4. Didn't apply change suggested in 2. of #4 due to comment in #5
Comment #7
japerryPage Manager 8.x-1.x is no longer supported, closing.