Closed (fixed)
Project:
Flag
Version:
8.x-4.x-dev
Component:
Flag core
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2015 at 22:09 UTC
Updated:
26 Apr 2015 at 17:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
martin107 commentedThis has a conflict with #2464995: FieldEntryFormController::getFlagging() change the 'unfound' return type from FALSE to NULL - no biggie :)
Comment #2
martin107 commentedNow that #2461549: use entity type hinting in routes things have changed a little
1) The 2 controller functions that call this new service method preload the entity - so it makes sense to pass that entity in rather than the entities id.
2) The guts of the function can be simplified with
\Drupal::service('flag')->
becoming just
$this->
Comment #6
martin107 commentedReroll triggered by #2464995: FieldEntryFormController::getFlagging() change the 'unfound' return type from FALSE to NULL
I also added a minor touch up to the wording of getFlagging()
/**
* Get a flagging that already exists.
*
* @param FlagInterface $flag
* The flag.
* @param mixed $entity_id
* The flaggable ID.
*
* @return FlaggingInterface|null
- * The flagging or NULL.
+ * The flagging or NULL if the flagging is not found.
*/
Comment #8
martin107 commentedA little fix.
Comment #10
martin107 commentedFlagFieldEntryTest now passes locally.
Comment #11
socketwench commentedComment #13
socketwench commentedThanks!!!!