You are here

function flag_node::get_flagging_record in Flag 7.3

Same name and namespace in other branches
  1. 6.2 flag.inc \flag_node::get_flagging_record()
  2. 7.2 flag.inc \flag_node::get_flagging_record()

Returns the flagging record.

This method returns the "flagging record": the {flagging} record that exists for each flagged item (for a certain user). If the item isn't flagged, returns NULL. This method could be useful, for example, when you want to find out the 'flagging_id' or 'timestamp' values.

Thanks to using a cache, inquiring several different flags about the same item results in only one SQL query.

Parameters are the same as is_flagged()'s.

Overrides flag_flag::get_flagging_record

File

includes/flag/flag_node.inc, line 113
Contains the flag_node class.

Class

flag_node
Implements a node flag.

Code

function get_flagging_record($entity_id, $uid = NULL, $sid = NULL) {
  $entity_id = $this
    ->get_translation_id($entity_id);
  return parent::get_flagging_record($entity_id, $uid, $sid);
}