Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
plugins/FeedsNodeProcessor.inc
237: public function setTargetElement(FeedsSource $source, $target_node, $target_element, $value) {
plugins/FeedsProcessor.inc
1023: public function setTargetElement(FeedsSource $source, $target_item, $target_element, $value) {
plugins/FeedsTermProcessor.inc
108: public function setTargetElement(FeedsSource $source, $target_term, $target_element, $value, array $mapping = array()) {
plugins/FeedsUserProcessor.inc
153: public function setTargetElement(FeedsSource $source, $target_user, $target_element, $value) {
The only call to this I can find passes the $mapping param:
plugins/FeedsProcessor.inc
804: $this->setTargetElement($source, $target_item, $target, $value, $mapping);
Comments
Comment #2
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedI think this was done for backwards compatibility. This way processor classes that override the
setTargetElement()
method that existed before the$mapping
parameter was added wouldn't break. Also, not every processor needs the information inside it. But processors that do have a need for the information can access it.I agree though that the code looks inconsistent and that the availibility of the
$mapping
parameter looks uncertain, but I'm not sure if it's worth to change it.The
$mapping
parameter was added in #860748: Config for mappers?.Comment #3
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedI think this works as designed. You may reopen this issue if you disagree.