Commit 6676f7a1 authored by John Cook's avatar John Cook Committed by jrockowitz

Issue #3000984 by John Cook, jrockowitz: "Submitted To" field not populated...

Issue #3000984 by John Cook, jrockowitz: "Submitted To" field not populated when using Paragraphs module
parent b5d30219
......@@ -163,9 +163,13 @@ class WebformEntityReferenceEntityFormatter extends WebformEntityReferenceFormat
else {
$values = [];
if ($this->getSetting('source_entity')) {
$parent_source_entity = $source_entity;
while ($parent_source_entity->getEntityTypeId() === 'paragraph') {
$parent_source_entity = $parent_source_entity->getParentEntity();
}
$values += [
'entity_type' => $source_entity->getEntityTypeId(),
'entity_id' => $source_entity->id(),
'entity_type' => $parent_source_entity->getEntityTypeId(),
'entity_id' => $parent_source_entity->id(),
];
}
if (!empty($items[$delta]->default_data)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment