Skip to content

Commit 8f2a12d

Browse files
MC-3029: Update Reader and Generate Allowed Parents List
- remove allowed_parents
1 parent b0004dd commit 8f2a12d

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ private function convertTypes(\DOMDocument $source): array
7676
'defaultPolicy' => $this->getAttributeValue($childNode, 'default_policy'),
7777
'types' => $this->convertParentChildData($childNode, 'child')
7878
];
79-
} elseif ('allowed_parents' === $childNode->nodeName) {
80-
$parents = [];
81-
foreach ($childNode->getElementsByTagName('parent') as $parentNode) {
82-
$parents[] = $parentNode->attributes->getNamedItem('name')->nodeValue;
83-
}
84-
$typesData[$name][$childNode->nodeName] = $parents;
8579
} else {
8680
$typesData[$name][$childNode->nodeName] = $childNode->nodeValue;
8781
}
@@ -475,7 +469,7 @@ private function convertParentChildDataToAllowedParents(array &$typesData)
475469
// convert children
476470
$allowedParents = $this->convertChildrenToAllowedParents($typesData, $types);
477471
foreach ($typesData as $key => &$typeData) {
478-
$typeData['allowed_parents_new'] = $allowedParents[$key];
472+
$typeData['allowed_parents'] = $allowedParents[$key];
479473
}
480474

481475
// convert parents
@@ -555,7 +549,7 @@ private function convertParentsToAllowedParents(array $typesData, array $types):
555549
}
556550
}
557551
}
558-
$typesData[$key]['allowed_parents_new'] = $allowedParents;
552+
$typesData[$key]['allowed_parents'] = $allowedParents;
559553
}
560554

561555
return $typesData;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Reader extends \Magento\Framework\Config\Reader\Filesystem
2121
self::TYPE_PATH => 'name',
2222
self::TYPE_PATH . '/parents/parent' => 'name',
2323
self::TYPE_PATH . '/children/child' => 'name',
24-
self::TYPE_PATH . '/allowed_parents/parent' => 'name',
2524
self::TYPE_PATH . '/appearances/appearance' => 'name',
2625
self::TYPE_PATH . '/appearances/appearance/data' => 'name',
2726
self::TYPE_PATH . '/appearances/appearance/data_mapping/elements/element' => 'name',

0 commit comments

Comments
 (0)