function flag_entity::get_entity_id in Flag 7.3
Returns the entity id, if it already exists.
Overrides flag_flag::get_entity_id
1 call to flag_entity::get_entity_id()
- flag_entity::get_flag_action in includes/
flag/ flag_entity.inc - Returns a 'flag action' object.
1 method overrides flag_entity::get_entity_id()
- flag_comment::get_entity_id in includes/
flag/ flag_comment.inc - Returns the entity id, if it already exists.
File
- includes/
flag/ flag_entity.inc, line 197 - Contains the flag_entity class.
Class
- flag_entity
- Base entity flag handler.
Code
function get_entity_id($entity) {
$entity_info = entity_get_info($this->entity_type);
if ($entity && isset($entity->{$entity_info['entity keys']['id']})) {
return $entity->{$entity_info['entity keys']['id']};
}
}