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.
Shoudn't the view class (or any of the ancestors) have a property var $current_diplay (or a magic method or a construct to initialize it)???
This property is later used in many places (e. g. views.inc line 214) :
$display_id = ($this->display_handler->is_defaulted('filters')) ? 'default' : $this->current_display;
Comment | File | Size | Author |
---|---|---|---|
#6 | add--variable-to-view-class-issue-1170572-1.patch | 399 bytes | neoglez |
#3 | add--variable-to-view-class-issue-1170572.patch | 405 bytes | neoglez |
Comments
Comment #1
neoglez CreditAttribution: neoglez commentedWell, going over some forums i find different opinions, the php manual doesn't say much, but it's a fact that properties can be created dinamically inside any function.
I think it wouldn't hurt to make the declaration (i'm seeing some strange behaviors that could be related to this).
Comment #2
dawehnerFeel free to create a patch with a sane default value.
Comment #3
neoglez CreditAttribution: neoglez commentedPiece of cake ;-)
Comment #4
dawehner@var is often used for the type of the var. Isn't string here something better.
Powered by Dreditor.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedI think declaring vars we use for sure in the view is a good thing; it improves documentation tremendously to do it. We have to do mor ethan just have the var, we need to provide doxygen with what it has.
Also, it would be good to analyze the view object and see what ELSE we're missing.
Comment #6
neoglez CreditAttribution: neoglez commentedyap, you're both so right!
Following the example in Drupal Doxygen and comment formatting conventions.
Comment #7
neoglez CreditAttribution: neoglez commentedComment #8
dawehnerThanks. Commited