You are here

protected function AssetFeedsProcessor::newEntity in Asset 7

Creates a new asset in memory and returns it.

File

modules/asset_feeds/AssetFeedsProcessor.inc, line 32
Class definition of AssetFeedsProcessor.

Class

AssetFeedsProcessor
Creates assets from feed items.

Code

protected function newEntity(FeedsSource $source) {
  $asset = new Asset(array(
    'type' => $this->config['asset_type'],
  ));
  $asset->changed = REQUEST_TIME;
  $asset->created = REQUEST_TIME;
  $asset->uid = $this->config['author'];
  return $asset;
}