public function FeedsNodeProcessor::setTargetElement in Feeds 7
Same name and namespace in other branches
- 6 plugins/FeedsNodeProcessor.inc \FeedsNodeProcessor::setTargetElement()
- 7.2 plugins/FeedsNodeProcessor.inc \FeedsNodeProcessor::setTargetElement()
Override setTargetElement to operate on a target item that is a node.
Overrides FeedsProcessor::setTargetElement
File
- plugins/
FeedsNodeProcessor.inc, line 244 - Class definition of FeedsNodeProcessor.
Class
- FeedsNodeProcessor
- Creates nodes from feed items.
Code
public function setTargetElement($target_node, $target_element, $value) {
if (in_array($target_element, array(
'url',
'guid',
))) {
$target_node->feeds_node_item->{$target_element} = $value;
}
elseif (in_array($target_element, array(
'title',
'status',
'created',
'nid',
'uid',
))) {
$target_node->{$target_element} = $value;
}
}