public function FeedsTermProcessor::getMappingTargets in Feeds 6
Same name and namespace in other branches
- 7.2 plugins/FeedsTermProcessor.inc \FeedsTermProcessor::getMappingTargets()
- 7 plugins/FeedsTermProcessor.inc \FeedsTermProcessor::getMappingTargets()
Return available mapping targets.
Overrides FeedsProcessor::getMappingTargets
File
- plugins/
FeedsTermProcessor.inc, line 245 - 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.'),
),
'synonyms' => array(
'name' => t('Term synonyms'),
'description' => t('One synonym or an array of synonyms of the taxonomy term.'),
),
'weight' => array(
'name' => t('Term weight'),
'description' => t('Weight of the taxonomy term.'),
),
'url' => array(
'name' => t('URL'),
'description' => t('The external URL of the term. E. g. the feed item URL in the case of a syndication feed. May be unique.'),
'optional_unique' => TRUE,
),
'guid' => array(
'name' => t('GUID'),
'description' => t('The external GUID of the term. E. g. the feed item GUID in the case of a syndication feed. May be unique.'),
'optional_unique' => TRUE,
),
);
// Let implementers of hook_feeds_term_processor_targets() add their targets.
$vocabulary = $this
->vocabulary();
if ($vocabulary) {
drupal_alter('feeds_term_processor_targets', $targets, $vocabulary->vid);
}
return $targets;
}