You are here

function flag_entity::get_flag_action in Flag 7.2

Same name and namespace in other branches
  1. 7.3 includes/flag/flag_entity.inc \flag_entity::get_flag_action()

Returns a 'flag action' object.

2 calls to flag_entity::get_flag_action()
flag_comment::get_flag_action in ./flag.inc
Returns a 'flag action' object.
flag_user::get_flag_action in ./flag.inc
Returns a 'flag action' object.
2 methods override flag_entity::get_flag_action()
flag_comment::get_flag_action in ./flag.inc
Returns a 'flag action' object.
flag_user::get_flag_action in ./flag.inc
Returns a 'flag action' object.

File

./flag.inc, line 1453
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_entity
Base entity flag handler.

Code

function get_flag_action($content_id) {
  $flag_action = parent::get_flag_action($content_id);
  $entity = $this
    ->fetch_content($content_id);
  $flag_action->content_title = entity_label($this->content_type, $entity);
  $flag_action->content_url = _flag_url($this->content_type . '/' . $this
    ->get_content_id($entity));
  return $flag_action;
}