Currently there is
ViewExecutable::renderField() (never used)
StylePluginBase::render_fields() (an internal set-up method)
StylePluginBase::get_field() (the actual API method)
In design, StylePluginBase::render_fields() is used to actual perform the rendering, and stores the results, while StylePluginBase::get_field() is used to retrieve those results.
In reality, several places call StylePluginBase::render_fields() directly and circumvent the implicit caching done by StylePluginBase::get_field().
Comment | File | Size | Author |
---|---|---|---|
#12 | drupal-1861838-12.patch | 7.75 KB | dawehner |
#7 | vdc-1861838-7.patch | 7.7 KB | tim.plunkett |
#7 | interdiff.txt | 4.22 KB | tim.plunkett |
#1 | vdc-1861838-1.patch | 3.82 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettSee attached.
Comment #2
Lars Toomre CreditAttribution: Lars Toomre commentedSince StylePluginBase::render_fields() is being turned into an internal protected method, does it make sense to change the method name to conform with camelCase naming convention too?
Comment #3
dawehnerKeep issues as simple as possible is the key to get stuff in.
This feels wrong, as it is a helpful thing when you just want to get that information of check for non-empty result.
Comment #4
xjmPlease move this issue to the Views 8.x-3.x branch as an active normal task once committed so we can write a change notice as a followup.
Comment #5
xjmRegarding #2, in this issue renaming the method or property is out of scope, because it would affect significantly more code than is touched by this patch. See #1856630: [Change notice] [META] Rename Views methods to core standards.
There is an entire postponed meta issue for renaming methods, but not for properties yet, so I'll file that one as well and we can take care of the rename there at the appropriate phase of the release cycle.
Comment #6
tim.plunkettStylePluginBase::$rendered_fields is never actually declared, and should be protected. Working on that next.
Comment #7
tim.plunkettOkay, cleaned that up.
Comment #8
dawehner#7: vdc-1861838-7.patch queued for re-testing.
Comment #9
dawehnerThis is RTBC once it is green.
Comment #10
damiankloip CreditAttribution: damiankloip commentedLooks good, I love it when we can just remove whole methods :)
Comment #12
dawehnerI really like the @see at the property.
This is just a rerole.
Comment #13
damiankloip CreditAttribution: damiankloip commentedI think this one is good to go now this is green. Nice docs, good tidy up.
Comment #14
Dries CreditAttribution: Dries commentedNice clean-up. Committed to 8.x. Thanks.
Comment #16
xjmComment #17
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedFor more information as to why this issue was moved to the Drupal core project, please see issue #3030347: Plan to clean process issue queue
Comment #18
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedMoving back to the contributed Views issue queue and closing as outdated per https://www.drupal.org/project/views/issues/3030347#comment-13023447