Skip to content

Commit 5353de4

Browse files
author
Michael Yu
committed
MC-3363: Additional configuration node changes
- Resolved failures due to configuration merging wrappers being removed - Updated integration tests to reflect above changes
1 parent ce4236f commit 5353de4

File tree

6 files changed

+872
-860
lines changed

6 files changed

+872
-860
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public function __construct(
3939
*/
4040
public function convert($source): array
4141
{
42-
return $this->convertTypes($source);
42+
return [
43+
'types' => $this->convertTypes($source)
44+
];
4345
}
4446

4547
/**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class Converter implements \Magento\Framework\Config\ConverterInterface
1919
*/
2020
public function convert($source): array
2121
{
22-
return $this->convertGroups($source);
22+
return [
23+
'groups' => $this->convertGroups($source)
24+
];
2325
}
2426

2527
/**

dev/tests/integration/testsuite/Magento/PageBuilder/_files/allowed_parent/expected_merged_array.php

Lines changed: 179 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -7,183 +7,185 @@
77
declare(strict_types=1);
88

99
return [
10-
'parents_and_children_allow' => [
11-
'name' => 'parents_and_children_allow',
12-
'label' => 'Type 1',
13-
'icon' => 'pagebuilder-type-icon',
14-
'component' => 'Path/to/component',
15-
'form' => 'pagebuilder_type_form',
16-
'group' => 'group',
17-
'sortOrder' => '1',
18-
'translate' => 'label',
19-
'allowed_parents' => [
20-
0 => 'parents_and_children_allow',
21-
1 => 'parents_and_children_deny',
22-
2 => 'parents_allow',
23-
3 => 'parents_deny',
24-
4 => 'children_allow',
25-
5 => 'children_deny',
26-
6 => 'no_parents_and_children',
27-
7 => 'parents_allow_with_parent',
28-
8 => 'parents_deny_with_parent',
29-
9 => 'children_allow_with_child',
30-
10 => 'children_deny_with_child'
31-
]
32-
],
33-
'parents_and_children_deny' => [
34-
'name' => 'parents_and_children_deny',
35-
'label' => 'Type 2',
36-
'icon' => 'pagebuilder-type-icon',
37-
'component' => 'Path/to/component',
38-
'form' => 'pagebuilder_type_form',
39-
'group' => 'group',
40-
'sortOrder' => '2',
41-
'translate' => 'label',
42-
'allowed_parents' => []
43-
],
44-
'parents_allow' => [
45-
'name' => 'parents_allow',
46-
'label' => 'Type 3',
47-
'icon' => 'pagebuilder-type-icon',
48-
'component' => 'Path/to/component',
49-
'form' => 'pagebuilder_type_form',
50-
'group' => 'group',
51-
'sortOrder' => '3',
52-
'translate' => 'label',
53-
'allowed_parents' => [
54-
0 => 'parents_and_children_allow',
55-
1 => 'parents_and_children_deny',
56-
2 => 'parents_allow',
57-
3 => 'parents_deny',
58-
4 => 'children_allow',
59-
5 => 'children_deny',
60-
6 => 'no_parents_and_children',
61-
7 => 'parents_allow_with_parent',
62-
8 => 'parents_deny_with_parent',
63-
9 => 'children_allow_with_child',
64-
10 => 'children_deny_with_child'
65-
]
66-
],
67-
'parents_deny' => [
68-
'name' => 'parents_deny',
69-
'label' => 'Type 4',
70-
'icon' => 'pagebuilder-type-icon',
71-
'component' => 'Path/to/component',
72-
'form' => 'pagebuilder_type_form',
73-
'group' => 'group',
74-
'sortOrder' => '4',
75-
'translate' => 'label',
76-
'allowed_parents' => [],
77-
],
78-
'children_allow' => [
79-
'name' => 'children_allow',
80-
'label' => 'Type 5',
81-
'icon' => 'pagebuilder-type-icon',
82-
'component' => 'Path/to/component',
83-
'form' => 'pagebuilder_type_form',
84-
'group' => 'group',
85-
'sortOrder' => '5',
86-
'translate' => 'label',
87-
'allowed_parents' => [
88-
0 => 'parents_and_children_allow',
89-
1 => 'children_allow',
90-
2 => 'children_allow_with_child'
91-
]
92-
],
93-
'children_deny' => [
94-
'name' => 'children_deny',
95-
'label' => 'Type 6',
96-
'icon' => 'pagebuilder-type-icon',
97-
'component' => 'Path/to/component',
98-
'form' => 'pagebuilder_type_form',
99-
'group' => 'group',
100-
'sortOrder' => '6',
101-
'translate' => 'label',
102-
'allowed_parents' => [
103-
0 => 'parents_and_children_allow',
104-
1 => 'children_allow',
105-
2 => 'children_allow_with_child'
106-
]
107-
],
108-
'no_parents_and_children' => [
109-
'name' => 'no_parents_and_children',
110-
'label' => 'Type 7',
111-
'icon' => 'pagebuilder-type-icon',
112-
'component' => 'Path/to/component',
113-
'form' => 'pagebuilder_type_form',
114-
'group' => 'group',
115-
'sortOrder' => '7',
116-
'translate' => 'label',
117-
'allowed_parents' => [
118-
0 => 'parents_and_children_allow',
119-
1 => 'children_allow',
120-
2 => 'children_deny_with_child'
121-
]
122-
],
123-
'parents_allow_with_parent' => [
124-
'name' => 'parents_allow_with_parent',
125-
'label' => 'Type 8',
126-
'icon' => 'pagebuilder-type-icon',
127-
'component' => 'Path/to/component',
128-
'form' => 'pagebuilder_type_form',
129-
'group' => 'group',
130-
'sortOrder' => '8',
131-
'translate' => 'label',
132-
'allowed_parents' => [
133-
0 => 'parents_and_children_allow',
134-
1 => 'parents_and_children_deny',
135-
2 => 'parents_allow',
136-
3 => 'parents_deny',
137-
4 => 'children_allow',
138-
5 => 'children_deny',
139-
6 => 'no_parents_and_children',
140-
7 => 'parents_deny_with_parent',
141-
8 => 'children_allow_with_child',
142-
9 => 'children_deny_with_child',
143-
10 => 'stage'
144-
]
145-
],
146-
'parents_deny_with_parent' => [
147-
'name' => 'parents_deny_with_parent',
148-
'label' => 'Type 9',
149-
'icon' => 'pagebuilder-type-icon',
150-
'component' => 'Path/to/component',
151-
'form' => 'pagebuilder_type_form',
152-
'group' => 'group',
153-
'sortOrder' => '9',
154-
'translate' => 'label',
155-
'allowed_parents' => [
156-
0 => 'stage'
157-
]
158-
],
159-
'children_allow_with_child' => [
160-
'name' => 'children_allow_with_child',
161-
'label' => 'Type 10',
162-
'icon' => 'pagebuilder-type-icon',
163-
'component' => 'Path/to/component',
164-
'form' => 'pagebuilder_type_form',
165-
'group' => 'group',
166-
'sortOrder' => '10',
167-
'translate' => 'label',
168-
'allowed_parents' => [
169-
0 => 'parents_and_children_allow',
170-
1 => 'children_allow',
171-
2 => 'children_allow_with_child'
172-
]
173-
],
174-
'children_deny_with_child' => [
175-
'name' => 'children_deny_with_child',
176-
'label' => 'Type 11',
177-
'icon' => 'pagebuilder-type-icon',
178-
'component' => 'Path/to/component',
179-
'form' => 'pagebuilder_type_form',
180-
'group' => 'group',
181-
'sortOrder' => '11',
182-
'translate' => 'label',
183-
'allowed_parents' => [
184-
0 => 'parents_and_children_allow',
185-
1 => 'children_allow',
186-
2 => 'children_allow_with_child'
10+
'types' => [
11+
'parents_and_children_allow' => [
12+
'name' => 'parents_and_children_allow',
13+
'label' => 'Type 1',
14+
'icon' => 'pagebuilder-type-icon',
15+
'component' => 'Path/to/component',
16+
'form' => 'pagebuilder_type_form',
17+
'group' => 'group',
18+
'sortOrder' => '1',
19+
'translate' => 'label',
20+
'allowed_parents' => [
21+
0 => 'parents_and_children_allow',
22+
1 => 'parents_and_children_deny',
23+
2 => 'parents_allow',
24+
3 => 'parents_deny',
25+
4 => 'children_allow',
26+
5 => 'children_deny',
27+
6 => 'no_parents_and_children',
28+
7 => 'parents_allow_with_parent',
29+
8 => 'parents_deny_with_parent',
30+
9 => 'children_allow_with_child',
31+
10 => 'children_deny_with_child'
32+
]
33+
],
34+
'parents_and_children_deny' => [
35+
'name' => 'parents_and_children_deny',
36+
'label' => 'Type 2',
37+
'icon' => 'pagebuilder-type-icon',
38+
'component' => 'Path/to/component',
39+
'form' => 'pagebuilder_type_form',
40+
'group' => 'group',
41+
'sortOrder' => '2',
42+
'translate' => 'label',
43+
'allowed_parents' => []
44+
],
45+
'parents_allow' => [
46+
'name' => 'parents_allow',
47+
'label' => 'Type 3',
48+
'icon' => 'pagebuilder-type-icon',
49+
'component' => 'Path/to/component',
50+
'form' => 'pagebuilder_type_form',
51+
'group' => 'group',
52+
'sortOrder' => '3',
53+
'translate' => 'label',
54+
'allowed_parents' => [
55+
0 => 'parents_and_children_allow',
56+
1 => 'parents_and_children_deny',
57+
2 => 'parents_allow',
58+
3 => 'parents_deny',
59+
4 => 'children_allow',
60+
5 => 'children_deny',
61+
6 => 'no_parents_and_children',
62+
7 => 'parents_allow_with_parent',
63+
8 => 'parents_deny_with_parent',
64+
9 => 'children_allow_with_child',
65+
10 => 'children_deny_with_child'
66+
]
67+
],
68+
'parents_deny' => [
69+
'name' => 'parents_deny',
70+
'label' => 'Type 4',
71+
'icon' => 'pagebuilder-type-icon',
72+
'component' => 'Path/to/component',
73+
'form' => 'pagebuilder_type_form',
74+
'group' => 'group',
75+
'sortOrder' => '4',
76+
'translate' => 'label',
77+
'allowed_parents' => [],
78+
],
79+
'children_allow' => [
80+
'name' => 'children_allow',
81+
'label' => 'Type 5',
82+
'icon' => 'pagebuilder-type-icon',
83+
'component' => 'Path/to/component',
84+
'form' => 'pagebuilder_type_form',
85+
'group' => 'group',
86+
'sortOrder' => '5',
87+
'translate' => 'label',
88+
'allowed_parents' => [
89+
0 => 'parents_and_children_allow',
90+
1 => 'children_allow',
91+
2 => 'children_allow_with_child'
92+
]
93+
],
94+
'children_deny' => [
95+
'name' => 'children_deny',
96+
'label' => 'Type 6',
97+
'icon' => 'pagebuilder-type-icon',
98+
'component' => 'Path/to/component',
99+
'form' => 'pagebuilder_type_form',
100+
'group' => 'group',
101+
'sortOrder' => '6',
102+
'translate' => 'label',
103+
'allowed_parents' => [
104+
0 => 'parents_and_children_allow',
105+
1 => 'children_allow',
106+
2 => 'children_allow_with_child'
107+
]
108+
],
109+
'no_parents_and_children' => [
110+
'name' => 'no_parents_and_children',
111+
'label' => 'Type 7',
112+
'icon' => 'pagebuilder-type-icon',
113+
'component' => 'Path/to/component',
114+
'form' => 'pagebuilder_type_form',
115+
'group' => 'group',
116+
'sortOrder' => '7',
117+
'translate' => 'label',
118+
'allowed_parents' => [
119+
0 => 'parents_and_children_allow',
120+
1 => 'children_allow',
121+
2 => 'children_deny_with_child'
122+
]
123+
],
124+
'parents_allow_with_parent' => [
125+
'name' => 'parents_allow_with_parent',
126+
'label' => 'Type 8',
127+
'icon' => 'pagebuilder-type-icon',
128+
'component' => 'Path/to/component',
129+
'form' => 'pagebuilder_type_form',
130+
'group' => 'group',
131+
'sortOrder' => '8',
132+
'translate' => 'label',
133+
'allowed_parents' => [
134+
0 => 'parents_and_children_allow',
135+
1 => 'parents_and_children_deny',
136+
2 => 'parents_allow',
137+
3 => 'parents_deny',
138+
4 => 'children_allow',
139+
5 => 'children_deny',
140+
6 => 'no_parents_and_children',
141+
7 => 'parents_deny_with_parent',
142+
8 => 'children_allow_with_child',
143+
9 => 'children_deny_with_child',
144+
10 => 'stage'
145+
]
146+
],
147+
'parents_deny_with_parent' => [
148+
'name' => 'parents_deny_with_parent',
149+
'label' => 'Type 9',
150+
'icon' => 'pagebuilder-type-icon',
151+
'component' => 'Path/to/component',
152+
'form' => 'pagebuilder_type_form',
153+
'group' => 'group',
154+
'sortOrder' => '9',
155+
'translate' => 'label',
156+
'allowed_parents' => [
157+
0 => 'stage'
158+
]
159+
],
160+
'children_allow_with_child' => [
161+
'name' => 'children_allow_with_child',
162+
'label' => 'Type 10',
163+
'icon' => 'pagebuilder-type-icon',
164+
'component' => 'Path/to/component',
165+
'form' => 'pagebuilder_type_form',
166+
'group' => 'group',
167+
'sortOrder' => '10',
168+
'translate' => 'label',
169+
'allowed_parents' => [
170+
0 => 'parents_and_children_allow',
171+
1 => 'children_allow',
172+
2 => 'children_allow_with_child'
173+
]
174+
],
175+
'children_deny_with_child' => [
176+
'name' => 'children_deny_with_child',
177+
'label' => 'Type 11',
178+
'icon' => 'pagebuilder-type-icon',
179+
'component' => 'Path/to/component',
180+
'form' => 'pagebuilder_type_form',
181+
'group' => 'group',
182+
'sortOrder' => '11',
183+
'translate' => 'label',
184+
'allowed_parents' => [
185+
0 => 'parents_and_children_allow',
186+
1 => 'children_allow',
187+
2 => 'children_allow_with_child'
188+
]
187189
]
188190
]
189191
];

0 commit comments

Comments
 (0)