Loads an entity from the database.
string $entity_type: The entity type to load, e.g. node or user.
int $id: The id of the entity to load.
bool $reset: Whether to reset the internal cache for the requested entity type.
Drupal\Core\Entity\EntityInterface The entity object, or FALSE if there is no entity with the given id.
\Drupal\Core\Entity\EntityManager
Drupal\Core\Entity\EntityStorageControllerInterface
Drupal\Core\Entity\DatabaseStorageController
Drupal\Core\Entity\Query\QueryInterface
function entity_load($entity_type, $id, $reset = FALSE) {
$entities = entity_load_multiple($entity_type, array(
$id,
), $reset);
return isset($entities[$id]) ? $entities[$id] : FALSE;
}