You are here

public function CommerceCouponEntityController::create in Commerce Coupon 7.2

Same name and namespace in other branches
  1. 7 classes/commerce_coupon.inc \CommerceCouponEntityController::create()

Create a default coupon.

Parameters

array $values: An array of values to set, keyed by property name.

Return value

object A coupon object with all default fields initialized.

Overrides DrupalCommerceEntityController::create

File

includes/commerce_coupon.controller.inc, line 34
Coupon controller class.

Class

CommerceCouponEntityController
Commerce Coupon controller class.

Code

public function create(array $values = array()) {
  $values += array(
    'coupon_id' => '',
    'code' => '',
    'bulk' => FALSE,
    'created' => '',
    'status' => TRUE,
    'uid' => 0,
  );
  return parent::create($values);
}