You are here

protected function FeedsTermProcessor::newEntity in Feeds 7.2

Creates a new term in memory and returns it.

Overrides FeedsProcessor::newEntity

File

plugins/FeedsTermProcessor.inc, line 33
FeedsTermProcessor class.

Class

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

Code

protected function newEntity(FeedsSource $source) {
  $vocabulary = $this
    ->vocabulary();
  $term = parent::newEntity($source);
  $term->vid = $vocabulary->vid;
  $term->vocabulary_machine_name = $vocabulary->machine_name;
  return $term;
}