1 entity_test.module entity_test_load($id, $reset = FALSE)

Loads a test entity.

Parameters

$id: A test entity ID.

$reset: A boolean indicating that the internal cache should be reset.

Return value

Entity: The loaded entity object, or FALSE if the entity cannot be loaded.

File

core/modules/entity/tests/entity_test/entity_test.module, line 60
Test module for the entity API providing an entity type for testing.

Code

function entity_test_load($id, $reset = FALSE) {
  $result = entity_load('entity_test', array($id), array(), $reset);
  return reset($result);
}