TYPO3: Get TypoScript variable contents within PHP code

revision 25989bc5bcfb8d44c91108c382a2d66da2e471b0

raw

typoscript.php

1
2
3
4
5
6
7
8
9
10
11
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Object\ObjectManager;
 
 
$om = GeneralUtility::makeInstance(ObjectManager::class);
$ts = $om->get(ConfigurationManagerInterface::class)->getConfiguration(
    ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT
);
$mydata = $ts['plugin.']['tx_myext.']['settings.']['something'];
 

History