function commerce_option_load in Commerce Product Option 7.2
Same name and namespace in other branches
- 7 commerce_option.module \commerce_option_load()
Load a commerce option.
Parameters
$option_id: Integer specifying the option id.
$reset: A boolean indicating that the internal cache should be reset.
Return value
A fully-loaded $option object or FALSE if it cannot be loaded.
See also
commerce_option_load_multiple()
1 call to commerce_option_load()
- commerce_option_entity_load in ./
commerce_option.module - Implements hook_entity_load().
1 string reference to 'commerce_option_load'
- commerce_option_entity_info in ./
commerce_option.module - Implements hook_entity_info().
File
- ./
commerce_option.module, line 276
Code
function commerce_option_load($option_id, $reset = FALSE) {
$ids = isset($option_id) ? array(
$option_id,
) : array();
$option = commerce_option_load_multiple($ids, array(), $reset);
return $option ? reset($option) : FALSE;
}