function commerce_pricelist_list_load in Commerce Pricelist 7
Fetch a basic object.
This function ends up being a shim between the menu system and commerce_pricelist_list_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: admin/commerce/pricelist/commerce_pricelist/basic/%commerce_pricelist_list in hook_menu() tells Drupal to call commerce_pricelist_list_load().
Parameters
int $entity_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 $entity object or FALSE if it cannot be loaded.
See also
commerce_pricelist_list_load_multiple()
File
- ./
commerce_pricelist.module, line 867 - Implements the basic functionality required for price lists
Code
function commerce_pricelist_list_load($list_id = NULL, $reset = FALSE) {
$list_id = isset($list_id) ? array(
$list_id,
) : array();
$entity = commerce_pricelist_list_load_multiple($list_id, array(), $reset);
return $entity ? reset($entity) : FALSE;
}