protected function Paragraphs::prepareValue in Paragraphs 8
Prepares a single value.
Parameters
int $delta: The field delta.
array $values: The values.
Overrides Text::prepareValue
File
- src/
Feeds/ Target/ Paragraphs.php, line 124
Class
- Paragraphs
- Feeds target plugin for Paragraphs fields.
Namespace
Drupal\paragraphs\Feeds\TargetCode
protected function prepareValue($delta, array &$values) {
parent::prepareValue($delta, $values);
$paragraph = $this->paragraphStorage
->create([
'type' => $this->configuration['paragraphs_type'],
$this->configuration['paragraph_field'] => $values,
]);
$values = [
'entity' => $paragraph,
];
}