You are here

protected function FeedsCommercePricelistItemProcessor::newEntity in Commerce Pricelist 7

Creates a new pricelist_item and returns it.

File

commerce_pricelist_feeds/plugins/FeedsCommercePricelistItemProcessor.inc, line 32
FeedsUserProcessor class.

Class

FeedsCommercePricelistItemProcessor
Feeds processor plugin. Create users from feed items.

Code

protected function newEntity(FeedsSource $source) {
  $list_id = $source->config['FeedsCommercePricelistItemProcessor']['list_id'];
  $pricelist_item = commerce_pricelist_item_new($list_id);
  $pricelist_item->log = 'Created by FeedsCommercePricelistItemProcessor';
  return $pricelist_item;
}