You are here

protected function FeedsRulesProcessor::map in Feeds Rules 7

File

plugins/FeedsRulesProcessor.inc, line 270
Defines the Feeds Rules processor plugin.

Class

FeedsRulesProcessor
Feeds processor plugin to process a rules component for each feed items.

Code

protected function map(FeedsSource $source, FeedsParserResult $result, $target_item = NULL) {
  $target_item = parent::map($source, $result, $target_item);

  // In addition to the mappings, we may add the source to the params.
  if (!empty($this->config['source-mapping'])) {
    list(, $key) = explode('::', $this->config['source-mapping'], 2);
    $target_item->params[$key] = $source;
  }
  return $target_item;
}