function flag_entity::replace_tokens in Flag 7.3
Same name and namespace in other branches
- 7.2 flag.inc \flag_entity::replace_tokens()
Replaces tokens.
Overrides flag_flag::replace_tokens
2 calls to flag_entity::replace_tokens()
- flag_comment::replace_tokens in includes/
flag/ flag_comment.inc - Replaces tokens.
- flag_node::replace_tokens in includes/
flag/ flag_node.inc - This is overridden for no other purpose than to document that $entity_id can be one of the following fake IDs in certain contexts:
2 methods override flag_entity::replace_tokens()
- flag_comment::replace_tokens in includes/
flag/ flag_comment.inc - Replaces tokens.
- flag_node::replace_tokens in includes/
flag/ flag_node.inc - This is overridden for no other purpose than to document that $entity_id can be one of the following fake IDs in certain contexts:
File
- includes/
flag/ flag_entity.inc, line 233 - Contains the flag_entity class.
Class
- flag_entity
- Base entity flag handler.
Code
function replace_tokens($label, $contexts, $options, $entity_id) {
if ($entity_id && ($entity = $this
->fetch_entity($entity_id))) {
$contexts[$this->entity_type] = $entity;
}
return parent::replace_tokens($label, $contexts, $options, $entity_id);
}