@@ -152,28 +152,21 @@ private function flattenContentTypeData($name, $contentType)
152
152
'icon ' => $ contentType ['icon ' ],
153
153
'form ' => $ contentType ['form ' ],
154
154
'contentType ' => '' ,
155
- 'group ' => (isset ($ contentType ['group ' ])
156
- ? $ contentType ['group ' ] : 'general ' ),
157
- 'fields ' => $ this ->uiComponentConfig ->getFields ($ contentType ['form ' ]),
158
- 'preview_template ' => (isset ($ contentType ['preview_template ' ])
159
- ? $ contentType ['preview_template ' ] : '' ),
160
- 'render_template ' => (isset ($ contentType ['render_template ' ])
161
- ? $ contentType ['render_template ' ] : '' ),
155
+ 'group ' => $ contentType ['group ' ] ?? 'general ' ,
156
+ 'fields ' => $ this ->uiComponentConfig ->getFields ($ contentType ['form ' ],
157
+ 'preview_template ' => $ contentType ['preview_template ' ] ?? '' ,
158
+ 'render_template ' => $ contentType ['render_template ' ] ?? '' ,
162
159
'component ' => $ contentType ['component ' ],
163
- 'preview_component ' => (isset ($ contentType ['preview_component ' ])
164
- ? $ contentType ['preview_component ' ]
165
- : self ::DEFAULT_PREVIEW_COMPONENT ),
166
- 'master_component ' => (isset ($ contentType ['master_component ' ])
167
- ? $ contentType ['master_component ' ]
168
- : self ::DEFAULT_MASTER_COMPONENT ),
169
- 'allowed_parents ' => isset ($ contentType ['allowed_parents ' ]) ? $ contentType ['allowed_parents ' ] : [],
170
- 'readers ' => isset ($ contentType ['readers ' ]) ? $ contentType ['readers ' ] : [],
171
- 'appearances ' => isset ($ contentType ['appearances ' ]) ? $ contentType ['appearances ' ] : [],
160
+ 'preview_component ' => $ contentType ['preview_component ' ] ?? self ::DEFAULT_PREVIEW_COMPONENT ,
161
+ 'master_component ' => $ contentType ['master_component ' ] ?? self ::DEFAULT_MASTER_COMPONENT ,
162
+ 'allowed_parents ' => $ contentType ['allowed_parents ' ] ?? [],
163
+ 'readers ' => $ contentType ['readers ' ] ?? [],
164
+ 'appearances ' => $ contentType ['appearances ' ] ?? [],
172
165
'additional_data ' => isset ($ contentType ['additional_data ' ])
173
166
? $ this ->additionalDataParser ->toArray ($ contentType ['additional_data ' ])
174
167
: [],
175
- 'elements ' => isset ( $ contentType ['elements ' ]) ? $ contentType [ ' elements ' ] : [],
176
- 'converters ' => isset ( $ contentType ['converters ' ]) ? $ contentType [ ' converters ' ] : [],
168
+ 'elements ' => $ contentType ['elements ' ] ?? [],
169
+ 'converters ' => $ contentType ['converters ' ] ?? [],
177
170
'is_visible ' => isset ($ contentType ['is_visible ' ]) && $ contentType ['is_visible ' ] === 'false ' ? false : true
178
171
];
179
172
}
0 commit comments