You are here

protected function FeedsCommerceProductProcessor::newEntity in Commerce Feeds 7

Creates a new product in memory and returns it.

File

plugins/FeedsCommerceProductProcessor.inc, line 32
Class definition of FeedsCommerceProductProcessor.

Class

FeedsCommerceProductProcessor
Creates products from feed items.

Code

protected function newEntity(FeedsSource $source) {
  $type = $this->config['product_type'];
  $product = commerce_product_new($type);
  $product->uid = $this->config['author'];
  $product->log = 'Created by FeedsCommerceProductProcessor';
  return $product;
}