Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
24 May 2013 at 03:45 UTC
Updated:
29 Jul 2014 at 22:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
malcomio commentedComment #2
malcomio commentedComment #3
oenie commentedAdd protected access modifier in front of the functions to adher to the new OOP standards.
Comment #4
theladebug commentedComment #6
theladebug commented#4: rename-views-method-default-action-2002438-4.patch queued for re-testing.
Comment #8
theladebug commentedrerolled patch
Comment #9
dawehnerThis has to be public, as it's called from outside.
Comment #10
theladebug commentedThanks, I'll reroll again. Is there a simple way to tell this or do you just have to know what the module is doing to know?
Thanks
Comment #11
oenie commented@theladebug: it's pretty straightforward:
If all calls you are seeing are on a $this instance (as was the case in the first patch), you can use protected.
If there are some calls where it's called on another instance, you have to use public.
So the reason why i suggested protected in comment #3, was because that patch had only $this->default_action() in its code. Using protected was fine there.
As it turns out, there was another call to the method that was missed in the first patch, as shown by dawehner #9 with the call $argument->defaultAction().
Because of that, you need to use public, because protected methods can only be called by an object itself (the $this->... construction).
Comment #12
theladebug commented@oenie - Thanks, I'm obviously a little rusty on my OOP (even though thats what all my "formal" training was - haha)
Comment #13
heddnLet's see if we make the testbot happy.
Comment #14
aspilicious commentedComment #15
alexpottCommitted 5c09348 and pushed to 8.x. Thanks!