TypoScript: .header = ... // Removing dots using removeDotsFromTS method $cleanTS = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($tsLine); // output => header = ...
TypoScript: .header = ... .footer = ... .sidebar = ... // Convert TypoScript to array $tsArray = explode(PHP_EOL, $tsString); // Loop through each TypoScript line and remove dots foreach ($tsArray as &$line) { $line = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($line); } // Convert array back to TypoScript string $cleanTS = implode(PHP_EOL, $tsArray); // output => header = ... // footer = ... // sidebar = ...Package Library: TYPO3\CMS\Core\Utility