You are here

public function CommerceCouponEntityController::create in Commerce Coupon 7

Same name and namespace in other branches
  1. 7.2 includes/commerce_coupon.controller.inc \CommerceCouponEntityController::create()

Create a default coupon.

Parameters

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

Return value

A product object with all default fields initialized.

Overrides DrupalCommerceEntityController::create

File

classes/commerce_coupon.inc, line 18
Coupon controller class.

Class

CommerceCouponEntityController
@file Coupon controller class.

Code

public function create(array $values = array()) {
  $values += array(
    'coupon_id' => '',
    'type' => '',
    'is_active' => TRUE,
    'created' => '',
    'changed' => '',
  );
  return parent::create($values);
}