public function MerciLineItemController::create in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3
Create a new entity.
Parameters
array $values: An array of values to set, keyed by property name.
Return value
A new instance of the entity type.
Overrides EntityAPIController::create
File
- merci_line_item/
includes/ entity.controller.inc, line 16
Class
- MerciLineItemController
- The controller class for line items contains methods for the line item CRUD operations. The load method is inherited from the default controller.
Code
public function create(array $values = array()) {
global $user;
$values += array(
'line_item_id' => NULL,
'entity_id' => 0,
'type' => MERCI_LINE_ITEM,
'line_item_label' => '',
'quantity' => 1,
'created' => '',
'changed' => '',
'owner' => $user->name,
'uid' => $user->uid,
'status' => 1,
'data' => array(),
);
return parent::create($values);
}