function flag_user::get_flag_action in Flag 7.3
Same name and namespace in other branches
- 5 flag.inc \flag_user::get_flag_action()
- 6.2 flag.inc \flag_user::get_flag_action()
- 6 flag.inc \flag_user::get_flag_action()
- 7.2 flag.inc \flag_user::get_flag_action()
Returns a 'flag action' object.
Overrides flag_entity::get_flag_action
File
- includes/
flag/ flag_user.inc, line 78 - Contains the flag_user class.
Class
- flag_user
- Implements a user flag.
Code
function get_flag_action($entity_id) {
$flag_action = parent::get_flag_action($entity_id);
$user = $this
->fetch_entity($entity_id);
$flag_action->content_title = $user->name;
$flag_action->content_url = $this
->_flag_url('user/' . $user->uid);
return $flag_action;
}