1 entity_example.module entity_example_basic_load($basic_id = NULL, $reset = FALSE)

Fetch a basic object.

This function ends up being a shim between the menu system and entity_example_basic_load_multiple().

This function gets its name from the menu system's wildcard naming conventions. For example, /path/%wildcard would end up calling wildcard_load(%wildcard value). In our case defining the path: examples/entity_example/basic/%entity_example_basic in hook_menu() tells Backdrop to call entity_example_basic_load().


int $basic_id: Integer specifying the basic entity id.

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

Return value

object: A fully-loaded $basic object or FALSE if it cannot be loaded.

See also



Related topics


modules/examples/entity_example/entity_example.module, line 118
Implements the basic functionality required to create and display an entity.


function entity_example_basic_load($basic_id = NULL, $reset = FALSE) {
  $basic_ids = (isset($basic_id) ? array($basic_id) : array());
  $basic = entity_example_basic_load_multiple($basic_ids, array(), $reset);
  return $basic ? reset($basic) : FALSE;