public function FeedsAtomRDFProcessor::setTargetElement in Feeds Atom 7
Override setTargetElement to operate on a target item that is a node.
File
- plugins/
FeedsAtomRDFProcessor.inc, line 190 - Contains the feeds atom RDF processor class.
Class
- FeedsAtomRDFProcessor
- Creates nodes from feed items.
Code
public function setTargetElement(FeedsSource $source, $target_node, $target_element, $value) {
if (strpos($target_element, '__') === 0) {
$field_name = substr($target_element, 2);
// Allow other modules to change the value of the imported item.
// Invokes hook_feeds_atom_set_target_element_value_alter().
// If there is a need to pass target_node or source, they should be passed in the same variable
// Since drupal_alter() has a limit on parameters.
drupal_alter('feeds_atom_set_target_element_value', $value, $field_name);
$target_node->{$field_name} = $value;
}
else {
parent::setTargetElement($source, $target_node, $target_element, $value);
}
}