function commerce_coupon_create in Commerce Coupon 7
Same name and namespace in other branches
- 7.2 commerce_coupon.module \commerce_coupon_create()
Create a new coupon object.
Parameters
$values: List of initial object attributes.
Return value
CommerceCoupon The new CommerceCoupon object.
2 calls to commerce_coupon_create()
- commerce_coupon_ui_coupon_add_any_access in ./
commerce_coupon_ui.module - Access callback: determines if the user can create any type of coupon.
- commerce_coupon_ui_menu in ./
commerce_coupon_ui.module - Implements hook_menu().
File
- ./
commerce_coupon.module, line 691 - Coupon System for Drupal Commerce.
Code
function commerce_coupon_create($type = '') {
return entity_get_controller('commerce_coupon')
->create(array(
'type' => $type,
));
}