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.
Part of meta-issue #1856630: [Change notice] [META] Rename Views methods to core standards
Comment | File | Size | Author |
---|---|---|---|
#30 | 2003366-30.patch | 21.39 KB | damiankloip |
#30 | interdiff-2003366-30.txt | 1 KB | damiankloip |
#29 | interdiff-25-29.txt | 1008 bytes | YesCT |
#29 | drupal-viewsRename-pre_render-2003366-29.patch | 21.38 KB | YesCT |
#29 | drupal-viewsRename-pre_render-2003366-29-rerolled.patch | 21.39 KB | YesCT |
Comments
Comment #1
kenianbei CreditAttribution: kenianbei commentedComment #2
kenianbei CreditAttribution: kenianbei commentedI've changed most of these, but I'm not sure if the module_invoke hook name should also be changed:
to
Comment #3
kenianbei CreditAttribution: kenianbei commentedI think I've found most/all of the pre_render method calls... I left the module invoke to use views_pre_render.
Comment #5
heddnComment #6
mari3.14 CreditAttribution: mari3.14 commented#3: drupal-rename-pre-render-2003366-3.patch queued for re-testing.
Comment #7
aspilicious CreditAttribution: aspilicious commentedAll these function should start with "public"
==> public function preRender
Should be good to go when thats fixed :)
Thnx for working on this
Comment #8
somepal CreditAttribution: somepal commentedsince its unassigned, taking a look at this, hope @kenianbei wouldn't mind.
@aspilicious so here's the patch.
Comment #9
heddnShould really use @inheritdoc.
Also, could you provide an interdiff?
Comment #10
heddnComment #11
somepal CreditAttribution: somepal commented@heddn thank you for pointing out, we have @inheritdoc now.
Comment #12
kenianbei CreditAttribution: kenianbei commented@Joe9: thanks for taking this, got caught up with work and haven't had time to follow through.
Comment #13
aspilicious CreditAttribution: aspilicious commentedThey need public access modifier
Comment #14
sillygwailoRe-roled with
public
on all the function declarations. Also fixed a typo (preEender) that snuck into the latest patch.Comment #16
pcambraHere's a rerroll with some minor changes, let's see if this is green now.
Comment #18
sillygwailoSame patch as #16 except with
public
in ContextualLinks.php (re-rolled against 8.x).Comment #19
damiankloip CreditAttribution: damiankloip commentedWhy this change?
Comment #20
pcambraFor what I've seen, we might not have control on what's coming in $values, if you check the test_dropbutton view, we've got a custom text in there, which will be pre rendered by the preRender method displayed in #19, but at that point $values has an array of all the nodes being rendered, I guess because the custom field is being rewritten to use the nid?
Comment #21
heddnLet's discuss the changes in #18 in a follow-up. The scope of this issue is to simply rename the function. Anything else should come elsewhere.
Comment #22
sillygwailoHere's the same patch as #14, but with
public
on ContextualLinks.php (also re-rolled against 8.x).Comment #23
pcambraComment #25
heddnLet's see if this passes.
Comment #26
heddnComment #28
joelpittetCustom class from
Drupal\views\Plugin\views\field\Custom
already defines a preRender method that isn't matching the signature of the new one FieldPluginBase (ie referenced and not returning values) and is used by it's buildOptionsForm. Not sure the best solution for this, though I am sure someone will know:)Comment #29
YesCT CreditAttribution: YesCT commentedthis renamed the pre-existing preRender in Custom to preRenderCustom
and then needed a reroll.
it was a clean merge with 8.x with no conflicts.
grepping to see if other preRender's would need to be renamed..
ag "extends Custom "
gives nothing, so this should be ok.
Comment #30
damiankloip CreditAttribution: damiankloip commentedCool, but I think we should call the Custom implementation of preRender preRenderCustomForm. As this is just a pre render callback for the form, and not for the actual handler result processing.
Comment #31
aspilicious CreditAttribution: aspilicious commenteddone!
Comment #32
alexpottCommitted 116f0a3 and pushed to 8.x. Thanks!
Comment #35
quietone CreditAttribution: quietone as a volunteer commentedClosed #2000348: Rename pre_render() to preRender as a duplicate.