You are here

protected function FeedsFieldCollectionProcessor::newEntity in Field collection feeds 7

Creates a new field collection item in memory and returns it.

File

plugins/FeedsFieldCollectionProcessor.inc, line 30
Class definition of FeedsFieldCollectionProcessor.

Class

FeedsFieldCollectionProcessor
Creates field collection from feed items.

Code

protected function newEntity(FeedsSource $source) {

  //$field_collection_item = entity_create('field_collection_item', array('field_name' => $this->config['field_name'], 'hostEntityType' => $this->config['host_entity_type']));

  //$field_collection_item->setHostEntity($entity_type, $entity, LANGUAGE_NONE, FALSE);
  $field_collection_item = new stdClass();
  $field_collection_item->field_name = $this->config['field_name'];
  $field_collection_item->hostEntityType = $this->config['host_entity_type'];
  return $field_collection_item;
}