You are here

function flag_entity::get_flag_action in Flag 7.3

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

Returns a 'flag action' object.

Overrides flag_flag::get_flag_action

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

File

includes/flag/flag_entity.inc, line 243
Contains the flag_entity class.

Class

flag_entity
Base entity flag handler.

Code

function get_flag_action($entity_id) {
  $flag_action = parent::get_flag_action($entity_id);
  $entity = $this
    ->fetch_entity($entity_id);
  $flag_action->content_title = entity_label($this->entity_type, $entity);
  $flag_action->content_url = $this
    ->_flag_url($this->entity_type . '/' . $this
    ->get_entity_id($entity));
  return $flag_action;
}