Skip to content

Commit efe6deb

Browse files
MC-3029: Update Reader and Generate Allowed Parents List
- add parent that is allowed when parents is allowed
1 parent a1e97f6 commit efe6deb

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/PageBuilder/Model/Config/ContentType

1 file changed

+6
-1
lines changed

app/code/Magento/PageBuilder/Model/Config/ContentType/Converter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,11 @@ private function convertParentsToAllowedParents(array $typesData, array $types):
546546
foreach ($parent['types'] as $type) {
547547
if ($type['policy'] === 'deny') {
548548
$allowedParents = $this->removeDataInArray($type['name'], $allowedParents);
549+
} else {
550+
$allowedParents = array_merge(
551+
$allowedParents,
552+
$this->getContentTypesByPolicy($parent['types'], 'allow')
553+
);
549554
}
550555
}
551556
}
@@ -614,6 +619,6 @@ private function removeDataInArray(string $searchValue, array $data): array
614619
if ($removeKey !== false) {
615620
unset($data[$removeKey]);
616621
}
617-
return $data;
622+
return array_values($data);
618623
}
619624
}

0 commit comments

Comments
 (0)