public function CommercePricelistListController::save in Commerce Pricelist 7
Implements EntityAPIControllerInterface.
Parameters
$transaction: Optionally a DatabaseTransaction object to use. Allows overrides to pass in their transaction object.
Overrides EntityAPIController::save
File
- includes/
commerce_pricelist_list.controller.inc, line 32 - Contains CommercePricelistListController.
Class
- CommercePricelistListController
- Handles CRUD for Pricelists.
Code
public function save($entity, DatabaseTransaction $transaction = NULL) {
// If our entity has no id, then we need to give it a
// time of creation.
if (empty($entity->list_id)) {
$entity->created = time();
}
return parent::save($entity, $transaction);
}