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 there are 3 views_ui_pre_render_* functions that live in views_ui/includes/admin.inc These are then added as pre_render callbacks in views plugins. This doesn't make sense, as everything else to do with buildForm etc... lives with the classes. These should be moved in the appropriate views plugin classes and called from there as methods.
This is reliant on #1993312: Change pre_render, post_render, and after_build callbacks to accept callables, so waiting on that.
Comment | File | Size | Author |
---|---|---|---|
#20 | interdiff-1993384-20.txt | 5.93 KB | damiankloip |
#20 | 1993384-20.patch | 11.59 KB | damiankloip |
#16 | 1993384-16.patch | 11.5 KB | grisendo |
#8 | 1993384-8.patch | 10.97 KB | damiankloip |
#8 | interdiff-1993384-8.txt | 3.7 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commented.
Comment #2
damiankloip CreditAttribution: damiankloip commentedComment #3
tim.plunkettI know these were copy paste, but we can clean them up a bit. If anything, we have to rewrap them to fit
Also, do we have any desire to remove the need for these? They just seem like FAPI abuse.
Comment #4
dawehnerSeems a little odd as coding standard.
Comment #6
dawehnervdc.views-ui-pre-render.patch queued for re-testing.
Comment #8
damiankloip CreditAttribution: damiankloip commentedI think we need to keep these, as they are specifically pre render callback so they can alter the form but we don't alter the $form_state['values'] structure.
Comment #10
damiankloip CreditAttribution: damiankloip commented#8: 1993384-8.patch queued for re-testing.
Comment #11
dawehnerSo let's move them further up.
Comment #12
damiankloip CreditAttribution: damiankloip commentedYeah, let's do that.
Comment #13
dawehner#8: 1993384-8.patch queued for re-testing.
Comment #15
dawehner.
Comment #16
grisendo CreditAttribution: grisendo commentedRe-rolled
Comment #18
grisendo CreditAttribution: grisendo commented16: 1993384-16.patch queued for re-testing.
Comment #19
grisendo CreditAttribution: grisendo commentedGreen now! Broken head before?
Comment #20
damiankloip CreditAttribution: damiankloip commentedThanks grisendo! Looks good. One more thing; I think we should not use $this in the pre render calls, everywhere else we are just doing get_class($this) nowadays.
So maybe just like this?
Comment #21
dawehnerShip it.
Comment #22
Xano20: 1993384-20.patch queued for re-testing.
Comment #23
Xano20: 1993384-20.patch queued for re-testing.
Comment #24
damiankloip CreditAttribution: damiankloip commentedI don't need to be assigned to this now.
Comment #25
alexpottCommitted 004fa12 and pushed to 8.x. Thanks!
[Edit] Removed a documentation fix I said I did when I did not.