You are here

function commerce_coupon_type_create in Commerce Coupon 7

Create a new type coupon object.

Parameters

$values: List of initial object attributes.

Return value

CommerceCoupon The new CommerceCouponType object.

1 call to commerce_coupon_type_create()
commerce_coupon_ui_menu in ./commerce_coupon_ui.module
Implements hook_menu().

File

./commerce_coupon.module, line 292
Coupon System for Drupal Commerce.

Code

function commerce_coupon_type_create(array $values = array()) {
  $values['is_new'] = TRUE;
  return new CommerceCouponType($values);
}