You are here

function commerce_pricelist_item_new in Commerce Pricelist 7

Returns an initialized pricelist item object.

Return value

A pricelist item object with all default fields initialized.

3 calls to commerce_pricelist_item_new()
commerce_pricelist_item_add in includes/commerce_pricelist.admin.inc
Provides a wrapper on the edit form to add a new entity.
commerce_pricelist_item_form in includes/commerce_pricelist.admin.inc
Form function to create an commerce_pricelist_list entity.
FeedsCommercePricelistItemProcessor::newEntity in commerce_pricelist_feeds/plugins/FeedsCommercePricelistItemProcessor.inc
Creates a new pricelist_item and returns it.

File

./commerce_pricelist.module, line 693
Implements the basic functionality required for price lists

Code

function commerce_pricelist_item_new($pricelist_id = NULL, $sku = NULL) {
  return entity_create('commerce_pricelist_item', array(
    'pricelist_id' => $pricelist_id,
    'sku' => $sku,
  ));
}