You are here

function _expire_load_single_entity in Cache Expiration 7.2

Loads and returns a single entity.

Parameters

$entity_type: The entity type to load.

$entity_id: The ID of the Entity to load.

Return value

mixed The desired entity or FALSE if it couldn't be found.

2 calls to _expire_load_single_entity()
ExpireAPI::expireReferences in includes/expire.api.inc
Find all entity references in fields and build urls for them.
ExpireVotingapi::expire in includes/expire.votingapi.inc
Executes expiration actions for user.

File

./expire.module, line 344
Provides logic for page cache expiration.

Code

function _expire_load_single_entity($entity_type, $entity_id) {
  $loaded_entity = entity_load($entity_type, array(
    $entity_id,
  ));
  return reset($loaded_entity);
}