You are here

public function FeedsTermProcessor::getMappingTargets in Feeds 7

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

Return available mapping targets.

Overrides FeedsProcessor::getMappingTargets

File

plugins/FeedsTermProcessor.inc, line 186
FeedsTermProcessor class.

Class

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

Code

public function getMappingTargets() {
  $targets = array(
    'name' => array(
      'name' => t('Term name'),
      'description' => t('Name of the taxonomy term.'),
      'optional_unique' => TRUE,
    ),
    'description' => array(
      'name' => t('Term description'),
      'description' => t('Description of the taxonomy term.'),
    ),
  );

  // Let implementers of hook_feeds_term_processor_targets() add their targets.
  if ($vocabulary = $this
    ->vocabulary()) {
    self::loadMappers();
    feeds_alter('feeds_processor_targets', $targets, 'taxonomy_term', $vocabulary->machine_name);
  }
  return $targets;
}