@@ -123,8 +123,12 @@ private function registerPlugins()
123123
124124 $ pluginSignature = strtolower ($ extensionName . '_ ' . $ pluginName );
125125
126- if ($ route ->hasDefault ('_wizard ' )) {
127- $ wizard = $ route ->getDefault ('_wizard ' );
126+ if (
127+ ($ wizard = $ route ->getDefault ('_wizard ' ))
128+ && !empty ($ wizard ['title ' ])
129+ && !empty ($ wizard ['description ' ])
130+ && !empty ($ wizard ['icon ' ])
131+ ) {
128132 $ header = 'common ' ;
129133
130134 if (!empty ($ wizard ['header ' ])) {
@@ -135,10 +139,14 @@ private function registerPlugins()
135139 $ newWizardHeaders [$ header ] = $ wizard ['header ' ];
136140 }
137141
142+ $ iconExtension = $ route ->hasDefault ('_wizard_icon_extension ' )
143+ ? $ route ->getDefault ('_wizard_icon_extension ' )
144+ : $ extensionName ;
145+
138146 $ wizards [$ header ][$ pluginSignature ] = [
139147 'title ' => $ wizard ['title ' ],
140148 'description ' => $ wizard ['description ' ],
141- 'icon ' => '../typo3conf/ext/ ' .$ extensionName .'/Resources/icons/wizard/ ' .$ wizard ['icon ' ],
149+ 'icon ' => '../typo3conf/ext/ ' .$ iconExtension .'/Resources/icons/wizard/ ' .$ wizard ['icon ' ],
142150 'rootline ' => !empty ($ wizard ['rootline ' ]) ? $ wizard ['rootline ' ] : null ,
143151 ];
144152 }
@@ -177,10 +185,11 @@ private function registerPlugins()
177185 */
178186 private function registerWizards (array $ wizards , array $ newWizardHeaders )
179187 {
180- $ tsConfig = '' ;
188+ $ tsConfig = " mod.wizards.newContentElement.wizardItems.common.show = * \n" ;
181189
182190 foreach ($ newWizardHeaders as $ header => $ name ) {
183191 $ tsConfig .= "mod.wizards.newContentElement.wizardItems. {$ header }.header = {$ name }\n" ;
192+ $ tsConfig .= "mod.wizards.newContentElement.wizardItems. {$ header }.show = * \n" ;
184193 }
185194
186195 foreach ($ wizards as $ header => $ newWizards ) {
@@ -192,8 +201,7 @@ private function registerWizards(array $wizards, array $newWizardHeaders)
192201 tt_content_defValues {
193202 CType = {$ plugin }
194203 }
195- }
196- mod.wizards.newContentElement.wizardItems. {$ header }.show := addToList( {$ plugin }) \n" ;
204+ } \n" ;
197205
198206 if (null !== $ wizard ['rootline ' ]) {
199207 $ wizardTs = "[PIDinRootline = {$ wizard ['rootline ' ]}] \n{$ wizardTs }[end] \n" ;
0 commit comments