Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the moment the viewExecutable also has a lot of properties like (live_preview) which simply should only be used
on the edit UI.
The idea is to create another object and use the data from there. It might be another object or some kind of decorator
or even just an extended class. This is not 100% clear.
Comment | File | Size | Author |
---|---|---|---|
#11 | views-1788232-12.patch | 18.65 KB | tim.plunkett |
#10 | views-1788232-10.patch | 15.85 KB | tim.plunkett |
#7 | views-1788232-7.patch | 132.61 KB | dawehner |
#5 | views-1788232-5.patch | 5.49 KB | dawehner |
#3 | views-1788232-2.patch | 5.49 KB | dawehner |
Comments
Comment #1
tim.plunkettI think one interim possibility would be an array property like $view->adminUI to put all of those properties in.
They are:
Comment #2
dawehnerThe easiest approach, extend the existing class and use this one in the loader function,
even simple editing works, this throws some kind of notices, which are not easy to find.
Comment #3
dawehner.
Comment #5
dawehnerLet's see whether the patch now works.
Comment #6
tim.plunkettWow, I can't believe that works. Awesome!
We can get rid of these comments now!
Might as well make this a ternary
Keep this out in the next reroll
Comment #7
dawehnerComment #8
tim.plunkettComment #10
tim.plunkettWhew! That took a while to debug.
WizardPluginBase::instantiate_view() needed a ViewUI, not a ViewExecutable.
Comment #11
tim.plunkettMore type hinting. I'm good with this now.
Comment #12
dawehnerThank you! Committed and pushed