function commerce_coupon_load_multiple in Commerce Coupon 7
Same name and namespace in other branches
- 7.2 commerce_coupon.module \commerce_coupon_load_multiple()
Load multiple coupons based on certain conditions.
Parameters
array $commerce_coupon_ids: An array of coupon IDs.
array $conditions: An array of conditions to match against the {commerce_coupon} table.
bool $reset: A boolean indicating that the internal cache should be reset.
Return value
array An array of coupon objects, indexed by coupon id.@see entity_load()
See also
5 calls to commerce_coupon_load_multiple()
- commerce_coupon_commerce_coupon_type_delete in ./
commerce_coupon.module - Implements hook_commerce_coupon_type_delete().
- commerce_coupon_commerce_price_component_type_info in ./
commerce_coupon.module - Implements hook_commerce_price_component_type_info().
- commerce_coupon_load in ./
commerce_coupon.module - Fetch a coupon object.
- commerce_coupon_type_disable in ./
commerce_coupon.module - Disables a coupon type and set as inactive all the coupons from the type.
- commerce_coupon_ui_settings_upgrade_coupons_submit in includes/
commerce_coupon_ui.settings.inc
File
- ./
commerce_coupon.module, line 589 - Coupon System for Drupal Commerce.
Code
function commerce_coupon_load_multiple($commerce_coupon_ids = array(), $conditions = array(), $reset = FALSE) {
if (empty($commerce_coupon_ids) && empty($conditions)) {
return array();
}
return entity_load('commerce_coupon', $commerce_coupon_ids, $conditions, $reset);
}