You are here

public function CommerceProductEntityController::create in Commerce Core 7

Create a default product.

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

modules/product/includes/commerce_product.controller.inc, line 24
The controller for the product entity containing the CRUD operations.

Class

CommerceProductEntityController
The controller class for products contains methods for the product CRUD operations.

Code

public function create(array $values = array()) {
  $values += array(
    'product_id' => NULL,
    'is_new' => TRUE,
    'sku' => '',
    'revision_id' => NULL,
    'title' => '',
    'uid' => '',
    'status' => 1,
    'created' => '',
    'changed' => '',
  );
  return parent::create($values);
}