Closed (fixed)
Project:
Token
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2016 at 07:20 UTC
Updated:
22 Jul 2016 at 16:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Bambell commentedHere we go. I'm not too sure about this, though. For instance, in #2611866: Add image style tokens for image fields, I'm relying on
image_styletokens. I can of course re-create the token, but I'm under the impression this might break a couple things.Comment #3
berdirBut what you are using for is something entirely different I think. This would be tokens for *one* image style. You're using it just to "pipe" through the image style selection, which is very different from what other tokens there would do.
So yes, you would have to define one anyway.
Lets change it to only do it for content entity types.
People find isSubclassOf() confusing and it might get deprecated at some point. I think we can do a check of $entity_info directly, that is a ContentEntityTypeInterface object (the @var above is strange, can you try to remove that, shouldn't be necessary..)
Comment #4
Bambell commentedYep. Here we go.
Comment #5
berdirLooks good.
I think it makes sense to have a simple assertion somewhere to make sure that a token type like Roles or so doesn't show up.
Comment #6
Bambell commentedUnitTestseems most appropriate for that.Comment #9
Bambell commentedBranch was up-to-date, not too sure what happened.
Comment #11
berdirThanks, committed.