Commit e9e799e8 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Migrate TYPO3_MODE usage

parent 83dfc13b
......@@ -26,6 +26,7 @@ namespace SGalinski\ContentReplacer\Service;
***************************************************************/
use SGalinski\ContentReplacer\Repository\TermRepository;
use TYPO3\CMS\Core\Http\ApplicationType;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
......@@ -105,7 +106,8 @@ abstract class AbstractParserService {
}
if ($stdWrap !== '') {
if (TYPO3_MODE === 'BE') {
$applicationType = GeneralUtility::makeInstance(ApplicationType::class);
if ($applicationType->isBackend()) {
$configurationManager = GeneralUtility::makeInstance(BackendConfigurationManager::class);
$extbaseFrameworkConfiguration = $configurationManager->getTypoScriptSetup();
$typoscriptConfiguration = $extbaseFrameworkConfiguration['plugin.']['tx_content_replacer.'][$stdWrap . '.'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment