Skip to content

Commit

Permalink
Drop unsupported options for elements and modules
Browse files Browse the repository at this point in the history
- form-icon in ``fieldsetStop``
- display-utilities in ``root_page_dependent_modules``
  • Loading branch information
zoglo committed Mar 26, 2024
1 parent d423264 commit 68cf8d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contao/templates/style-manager-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2924,7 +2924,7 @@
<field title="chosen">1</field>
<field title="blankOption">1</field>
<field title="extendFormFields">1</field>
<field title="formFields">a:12:{i:0;s:11:"explanation";i:1;s:13:"fieldsetStart";i:2;s:12:"fieldsetStop";i:3;s:4:"text";i:4;s:8:"password";i:5;s:8:"textarea";i:6;s:6:"select";i:7;s:5:"radio";i:8;s:8:"checkbox";i:9;s:6:"upload";i:10;s:5:"range";i:11;s:7:"captcha";}</field>
<field title="formFields">a:11:{i:0;s:11:"explanation";i:1;s:13:"fieldsetStart";i:2;s:4:"text";i:3;s:8:"password";i:4;s:8:"textarea";i:5;s:6:"select";i:6;s:5:"radio";i:7;s:8:"checkbox";i:8;s:6:"upload";i:9;s:5:"range";i:10;s:7:"captcha";}</field>
</child>
<child alias="alignment">
<field title="pid">2040</field>
Expand All @@ -2936,7 +2936,7 @@
<field title="chosen">1</field>
<field title="blankOption">1</field>
<field title="extendFormFields">1</field>
<field title="formFields">a:12:{i:0;s:11:"explanation";i:1;s:13:"fieldsetStart";i:2;s:12:"fieldsetStop";i:3;s:4:"text";i:4;s:8:"password";i:5;s:8:"textarea";i:6;s:6:"select";i:7;s:5:"radio";i:8;s:8:"checkbox";i:9;s:6:"upload";i:10;s:5:"range";i:11;s:7:"captcha";}</field>
<field title="formFields">a:11:{i:0;s:11:"explanation";i:1;s:13:"fieldsetStart";i:2;s:4:"text";i:3;s:8:"password";i:4;s:8:"textarea";i:5;s:6:"select";i:6;s:5:"radio";i:7;s:8:"checkbox";i:8;s:6:"upload";i:9;s:5:"range";i:10;s:7:"captcha";}</field>
</child>
</children>
</archive>
Expand Down
13 changes: 9 additions & 4 deletions src/Generator/ConfigGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getAllContentElements(): array
return [];
}

return $this->getArrayRecursiveKeys($GLOBALS['TL_CTE'], 'Stop');
return $this->getArrayRecursiveKeys($GLOBALS['TL_CTE'], ['Stop']);
}

/**
Expand All @@ -101,7 +101,7 @@ public function getAllFrontendModules(): array
return [];
}

return $this->getArrayRecursiveKeys($GLOBALS['FE_MOD']);
return $this->getArrayRecursiveKeys($GLOBALS['FE_MOD'], ['root_page_dependent_modules']);
}

/**
Expand Down Expand Up @@ -285,7 +285,7 @@ private function generateBackendCss(): void
ThemeManager::createCSSFile('backendColors', $css);
}

private function getArrayRecursiveKeys(array $array, ?string $filter = null): array
private function getArrayRecursiveKeys(array $array, ?array $filters = []): array
{
$return = [];

Expand All @@ -294,7 +294,12 @@ private function getArrayRecursiveKeys(array $array, ?string $filter = null): ar
$return = array_merge($group, $return);
}

if (null !== $filter)
if (empty($filters))
{
return $return;
}

foreach ($filters as $filter)
{
foreach ($return as $k => $v)
{
Expand Down

0 comments on commit 68cf8d4

Please sign in to comment.