Skip to content

Commit

Permalink
TYPO3 13 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
svewap committed Sep 25, 2024
1 parent 3911d51 commit e1ba340
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Classes/Hooks/RenderPreProcessorHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function renderPreProcessorProc(array &$params, PageRenderer $pageRendere
return;
}

$setup = $GLOBALS['TSFE']->tmpl->setup;
$setup = $GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.typoscript')->getSetupArray();
if (\is_array($setup['plugin.']['tx_wsscss.']['variables.'] ?? null)) {

$variables = $setup['plugin.']['tx_wsscss.']['variables.'];
Expand Down Expand Up @@ -111,14 +111,14 @@ public function renderPreProcessorProc(array &$params, PageRenderer $pageRendere
$unlink = false;

// search settings for scss file
if (is_array($GLOBALS['TSFE']->pSetup['includeCSS.'] ?? [])) {
foreach ($GLOBALS['TSFE']->pSetup['includeCSS.'] as $key => $keyValue) {
if (is_array($setup['page.']['includeCSS.'] ?? [])) {
foreach ($setup['page.']['includeCSS.'] as $key => $keyValue) {
if (str_ends_with($key, '.')) {
continue;
}

if ($file === $keyValue) {
$subConf = $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.'] ?? [];
$subConf = $setup['page.']['includeCSS.'][$key . '.'] ?? [];

$outputFilePath = $subConf['outputfile'] ?? null;
$useSourceMap = $this->parseBooleanSetting($subConf['sourceMap'] ?? false, false);
Expand All @@ -127,7 +127,7 @@ public function renderPreProcessorProc(array &$params, PageRenderer $pageRendere
$outputStyle = $subConf['outputStyle'];
}
$variables = array_filter($subConf['variables.'] ?? []);
$inlineOutput = $this->parseBooleanSetting($GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['inlineOutput'] ?? false, false);
$inlineOutput = $this->parseBooleanSetting($setup['page.']['includeCSS.'][$key . '.']['inlineOutput'] ?? false, false);
}
}
}
Expand Down

0 comments on commit e1ba340

Please sign in to comment.