private function Importer::setValue in Feeds Paragraphs 8
Parameters
Paragraph $paragraph:
$value:
1 call to Importer::setValue()
- Importer::import in src/
Importer.php
File
- src/
Importer.php, line 132
Class
Namespace
Drupal\feeds_para_mapperCode
private function setValue($paragraph, $value) {
$target = $this->target
->getName();
// Reset the values of the target:
$paragraph->{$target} = NULL;
// We call setTarget on the target plugin instance, and it will call prepareValues,
// which will eventually set the value for the field.
// @todo: changing the field type is causing the paragraph entity to have wrong field type,
// even after changing it later to the original type,
// maybe before creating the paragraph entity we need to change all the field types we are going to map
$this->instance
->setTarget($this->feed, $paragraph, $target, $value);
}