Skip to content

Commit 89fea2b

Browse files
committed
Fix some specials for the wizard configuration
1 parent 467887e commit 89fea2b

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

src/BartacusBundle.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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";

src/Kernel/Kernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
*/
4343
abstract class Kernel extends BaseKernel
4444
{
45-
const VERSION = '0.3.9';
46-
const VERSION_ID = '00309';
45+
const VERSION = '0.3.9.1';
46+
const VERSION_ID = '0030901';
4747
const MAJOR_VERSION = '0';
4848
const MINOR_VERSION = '3';
49-
const RELEASE_VERSION = '';
50-
const EXTRA_VERSION = '';
49+
const RELEASE_VERSION = '9';
50+
const EXTRA_VERSION = '1';
5151

5252
/**
5353
* {@inheritdoc}

0 commit comments

Comments
 (0)