You are here

protected function FeedsNodeProcessor::newEntity in Feeds 7.2

Creates a new node in memory and returns it.

Overrides FeedsProcessor::newEntity

File

plugins/FeedsNodeProcessor.inc, line 57
Class definition of FeedsNodeProcessor.

Class

FeedsNodeProcessor
Creates nodes from feed items.

Code

protected function newEntity(FeedsSource $source) {
  $node = parent::newEntity($source);
  $node->type = $this
    ->bundle();
  $node->changed = REQUEST_TIME;
  $node->created = REQUEST_TIME;
  $node->is_new = TRUE;
  node_object_prepare($node);

  // Populate properties that are set by node_object_prepare().
  $node->log = 'Created by FeedsNodeProcessor';
  $node->uid = $this->config['author'];
  return $node;
}