You are here

function flag_flag::get_flag_action in Flag 7.3

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. 6 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.

1 call to flag_flag::get_flag_action()
flag_entity::get_flag_action in includes/flag/flag_entity.inc
Returns a 'flag action' object.
1 method overrides flag_flag::get_flag_action()
flag_entity::get_flag_action in includes/flag/flag_entity.inc
Returns a 'flag action' object.

File

includes/flag/flag_flag.inc, line 1266
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 get_flag_action($entity_id) {
  $flag_action = new stdClass();
  $flag_action->flag = $this->name;
  $flag_action->entity_type = $this->entity_type;
  $flag_action->entity_id = $entity_id;
  return $flag_action;
}