You are here

protected function FarmAssetProcessor::entityLoad in farmOS 7

Loads an existing farm asset.

If the update existing method is not FEEDS_UPDATE_EXISTING, only the farm_asset table will be loaded, foregoing the farm_asset_load API for better performance.

File

modules/farm/farm_asset/includes/feeds/plugins/FarmAssetProcessor.inc, line 58
Class definition of FarmAssetProcessor.

Class

FarmAssetProcessor
Creates farm assets from feed items.

Code

protected function entityLoad(FeedsSource $source, $id) {
  $farm_asset = parent::entityLoad($source, $id);
  if ($this->config['update_existing'] != FEEDS_UPDATE_EXISTING) {
    $farm_asset->uid = $this->config['author'];
  }
  return $farm_asset;
}