You are here

protected function FeedsProcessor::loadItemInfo in Feeds 8.2

Loads existing entity information and places it on $entity->feeds_item.

Parameters

$entity: The entity object to load item info for. Id key must be present.

Return value

TRUE if item info could be loaded, false if not.

File

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

Class

FeedsProcessor
Abstract class, defines interface for processors.

Namespace

Drupal\feeds\Plugin

Code

protected function loadItemInfo($entity) {
  $entity_info = entity_get_info($this
    ->entityType());
  $key = $entity_info['entity_keys']['id'];
  if ($item_info = feeds_item_info_load($this
    ->entityType(), $entity->{$key})) {
    $entity->feeds_item = $item_info;
    return TRUE;
  }
  return FALSE;
}