You are here

function flag_flag::get_flag_action in Flag 6

Same name and namespace in other branches
  1. 5 flag.inc \flag_flag::get_flag_action()
  2. 6.2 flag.inc \flag_flag::get_flag_action()
  3. 7.3 includes/flag/flag_flag.inc \flag_flag::get_flag_action()
  4. 7.2 flag.inc \flag_flag::get_flag_action()

Returns a 'flag action' object. It exists only for the sake of its informative tokens. Currently, it's utilized only for the 'mail' action.

Derived classes should populate the 'content_title' and 'content_url' slots.

File

./flag.inc, line 581
Implements various flags. Uses 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 get_flag_action($content_id) {
  $flag_action = new stdClass();
  $flag_action->flag = $this->name;
  $flag_action->content_type = $this->content_type;
  $flag_action->content_id = $content_id;
  return $flag_action;
}