Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Nov 2014 at 14:44 UTC
Updated:
18 Dec 2014 at 12:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
daffie commentedI would like to get this fixed. So I will do a good review for posted patches.
Comment #2
daffie commentedThe class variables $name and $label need to become protected.
You can use the functions id() as a getter function for the name variable and label() as a getter function for the variable label.
Comment #3
sharique commentedHere is the patch. Please review.
Comment #5
daffie commentedThe function getLabel() is not necessary. There is a build in function label().
The function setLabel() will probably not be used. Maybe only in testing. You can remove them and use set('label', $value).
Comment #6
fernando_calsa commentedI go to work in this issue
Comment #7
fernando_calsa commentedAs daffie comments in #5 I've removed getLavel() and setLabel()
Comment #9
areke commentedComment #11
daffie commentedThe reason that your patch failed testing is that outside the NodeType class the class variables are no longer accessible. And it will result in an error. Use the methods id() and label() to fix this. If you need the set a variable use set('name', $value) or set('label', $value).
This function is inherited from the Entity class. So it can be removed.
This function is not used. You can remove it and use set('label', $value).
Comment #12
rpayanmComment #14
rpayanmComment #15
daffie commentedYour solution also works, but there is a build in function label() that does the same. And that is the function that other developers expect.
Comment #16
areke commentedComment #20
rpayanmComment #25
daffie commentedAll the class variables are protected.
There are already getter functions available, so no need for new ones.
The test-server give it green.
It all looks good to me, so for me it is RTBC.
Comment #26
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 4acf770 and pushed to 8.0.x. Thanks!