Closed (fixed)
Project:
Flag
Version:
8.x-4.x-dev
Component:
Flag core
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2015 at 23:50 UTC
Updated:
9 Apr 2015 at 11:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webflo commentedYou could throw an InvalidArgumentException or LogicException.
Comment #2
socketwench commented$action is a bit tricky. Some modules, like flag_friend, will use a different action (friend/unfriend). This was possible in 7.x-3.x, but it's an open question for 8.x-4.x. Modules like flag_friend would either implement event handling for the action, or provide their own link type -- which is a lot easier now.
Comment #3
socketwench commentedSo really the issue here is if hasActionAccess() is the right API or not. If we only allow flag and unflag, we should have canFlag() and canUnflag() instead. Then we'd need to change flag_entity_view() to use the method.
Comment #4
joachim commented> Some modules, like flag_friend, will use a different action (friend/unfriend)
That sounds... crazy :/
Also, I've had a quick look at the code for flag_friend, and I can't actually see any use of that.
Comment #5
socketwench commentedOh, right! I refactored FF so it doesn't do that any longer.
Comment #6
socketwench commentedCreated https://www.drupal.org/node/2417925
Comment #7
socketwench commentedReturning nothing would probably be the better course of action here.
Comment #9
joachim commentedCommitted! Thanks!