public function FeedsTermProcessor::setTargetElement in Feeds 6
Same name and namespace in other branches
- 7.2 plugins/FeedsTermProcessor.inc \FeedsTermProcessor::setTargetElement()
Override setTargetElement to operate on a target item that is a term.
Overrides FeedsProcessor::setTargetElement
File
- plugins/
FeedsTermProcessor.inc, line 227 - FeedsTermProcessor class.
Class
- FeedsTermProcessor
- Feeds processor plugin. Create taxonomy terms from feed items.
Code
public function setTargetElement(&$target_item, $target_element, $value) {
switch ($target_element) {
case 'url':
case 'guid':
$target_item['feeds_term_item'][$target_element] = $value;
break;
case 'weight':
$target_item['weight'] = (int) $value;
break;
default:
parent::setTargetElement($target_item, $target_element, $value);
break;
}
}