Closed (fixed)
Project:
Views (for Drupal 7)
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Jul 2013 at 15:27 UTC
Updated:
4 Jan 2014 at 03:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerSo we could typehint something like \Drupal\Core\Entity\EntityInterface[]
Comment #2
damiankloip commentedYep, good docs. I will open a follow up to do the type conversions, as there will be alot.
Comment #3
damiankloip commentedI created #2034979: Typehint Views field handler methods with ResultRow as a followup to typehint all the things.
Comment #5
damiankloip commentedOk, we have to make atleast one typehint change...
Comment #6
dawehnerThis is definitive if used everywhere a huge DX win! that is public and named exactly like that so we don't have to change like everything.
Comment #8
damiankloip commentedOk, so there are some render_link methods with \stdClass typed. Let's change those.
I think fixing/adding docblocks and adding public to methods is out of scope of this issue, what do you think?
Comment #9
dawehnerLets try to keep it as small as possible so +1 if it is green.
Comment #11
damiankloip commentedOops, missed a use statement. noise - sorry.
Comment #12
dawehnerLet's go!
Comment #13
chx commentedHard to find the words for the joy I have over this. stdClass is a sad remnant of an ancient age (like Drupal 7).
With that said,
public $_entity = NULL;-- I see it's not this issue, perhaps a followup to rename wholesale?Comment #14
damiankloip commentedYeah :) I see your point, $_entity suggests protected. I think a follow up would be a good plan, as we could potentially get into conflicts if a field was called 'entity' at the moment, unlikely, but could happen I think.
Comment #15
dawehnerYeah on the longrun having that is a method would be just perfect!
Comment #16
dawehnerYeah on the longrun having that is a method would be just perfect, especially fetching this information could be deferred until it is needed.
Comment #17
alexpottNeeds a reroll...
Comment #18
damiankloip commentedThere we go.
Comment #19
damiankloip commentedAnd back..
Comment #20
alexpottNeeds a reroll...
Comment #21
damiankloip commentedAgain!! ok :)
Comment #22
alvar0hurtad0I applyes and works fine
Comment #23
damiankloip commentedThanks for testing.
Comment #24
alexpottCommitted 08aeb87 and pushed to 8.x. Thanks!
Comment #25
xjmComment #26
damiankloip commentedHow about this? https://drupal.org/node/2059483
We don't need too much because it doesn't do a great deal at the moment, until we typehint where we need to.
Comment #27
dawehner+1