function flag_flag::is_flagged in Flag 7.3
Same name and namespace in other branches
- 5 flag.inc \flag_flag::is_flagged()
- 6.2 flag.inc \flag_flag::is_flagged()
- 6 flag.inc \flag_flag::is_flagged()
- 7.2 flag.inc \flag_flag::is_flagged()
Determines if a certain user has flagged this object.
Thanks to using a cache, inquiring several different flags about the same item results in only one SQL query.
Parameters
int $uid: (optional) The user ID whose flags we're checking. If none given, the current user will be used.
Return value
bool TRUE if the object is flagged, FALSE otherwise.
1 call to flag_flag::is_flagged()
- flag_flag::access in includes/
flag/ flag_flag.inc - Determines whether the user may flag, or unflag, the given entity.
File
- includes/
flag/ flag_flag.inc, line 999 - Contains the flag_flag class. Flag type classes use an object oriented style inspired by that of Views 2.
Class
- flag_flag
- This abstract class represents a flag, or, in Views 2 terminology, "a handler".
Code
function is_flagged($entity_id, $uid = NULL, $sid = NULL) {
return (bool) $this
->get_flagging_record($entity_id, $uid, $sid);
}