You are here

protected function FeedsTermProcessor::map in Feeds 7

Same name and namespace in other branches
  1. 6 plugins/FeedsTermProcessor.inc \FeedsTermProcessor::map()

Execute mapping on an item.

Overrides FeedsProcessor::map

1 call to FeedsTermProcessor::map()
FeedsTermProcessor::process in plugins/FeedsTermProcessor.inc
Implements FeedsProcessor::process().

File

plugins/FeedsTermProcessor.inc, line 120
FeedsTermProcessor class.

Class

FeedsTermProcessor
Feeds processor plugin. Create taxonomy terms from feed items.

Code

protected function map(FeedsImportBatch $batch, $target_term = NULL) {

  // Prepare term object, have parent class do the iterating.
  if (!$target_term) {
    $target_term = new stdClass();
  }
  if (!($vocabulary = $this
    ->vocabulary())) {
    throw new Exception(t('No vocabulary specified for term processor'));
  }
  $target_term->vid = $vocabulary->vid;
  $target_term = parent::map($batch, $target_term);
  return $target_term;
}