You are here

protected function FeedsProcessor::newItemInfo in Feeds 8.2

Adds Feeds specific information on $entity->feeds_item.

Parameters

$entity: The entity object to be populated with new item info.

$feed_nid: The feed nid of the source that produces this entity.

$hash: The fingerprint of the source item.

1 call to FeedsProcessor::newItemInfo()
FeedsProcessor::process in lib/Drupal/feeds/Plugin/FeedsProcessor.php
Process the result of the parsing stage.

File

lib/Drupal/feeds/Plugin/FeedsProcessor.php, line 804
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Namespace

Drupal\feeds\Plugin

Code

protected function newItemInfo($entity, $feed_nid, $hash = '') {
  $entity->feeds_item = new \stdClass();
  $entity->feeds_item->is_new = TRUE;
  $entity->feeds_item->entity_id = 0;
  $entity->feeds_item->entity_type = $this
    ->entityType();
  $entity->feeds_item->id = $this->id;
  $entity->feeds_item->feed_nid = $feed_nid;
  $entity->feeds_item->imported = REQUEST_TIME;
  $entity->feeds_item->hash = $hash;
  $entity->feeds_item->url = '';
  $entity->feeds_item->guid = '';
}