You are here

function flag_comment::get_flag_action in Flag 7.3

Same name and namespace in other branches
  1. 5 flag.inc \flag_comment::get_flag_action()
  2. 6.2 flag.inc \flag_comment::get_flag_action()
  3. 6 flag.inc \flag_comment::get_flag_action()
  4. 7.2 flag.inc \flag_comment::get_flag_action()

Returns a 'flag action' object.

Overrides flag_entity::get_flag_action

File

includes/flag/flag_comment.inc, line 166
Contains the flag_comment class.

Class

flag_comment
Implements a comment flag.

Code

function get_flag_action($entity_id) {
  $flag_action = parent::get_flag_action($entity_id);
  $comment = $this
    ->fetch_entity($entity_id);
  $flag_action->content_title = $comment->subject;
  $flag_action->content_url = $this
    ->_flag_url("comment/{$comment->cid}", "comment-{$comment->cid}");
  return $flag_action;
}