You are here

function flag_entity::_load_entity in Flag 7.3

Loads the entity object.

Overrides flag_flag::_load_entity

File

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

Class

flag_entity
Base entity flag handler.

Code

function _load_entity($entity_id) {
  if (is_numeric($entity_id)) {
    $entity = entity_load($this->entity_type, array(
      $entity_id,
    ));
    return reset($entity);
  }
  return NULL;
}