You are here

public function CommerceInvoiceEntityController::create in Commerce Invoice 7

Create a default invoice.

Parameters

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

Return value

An invoice object with all default fields initialized.

Overrides DrupalCommerceEntityController::create

File

includes/commerce_invoice.controller.inc, line 23
The controller for the invoice entity containing the CRUD operations.

Class

CommerceInvoiceEntityController
The controller class for invoices contains methods for the order CRUD operations. The load method is inherited from the default controller.

Code

public function create(array $values = array()) {
  return (object) ($values + array(
    'invoice_id' => '',
    'invoice_number' => '',
    'order_id' => 0,
    'uid' => '',
    'created' => '',
    'changed' => '',
    'type' => 'commerce_invoice',
  ));
}