TYPO3: Get TypoScript variable contents within PHP code

raw

README.rst

typo3 php get typoscript path

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'];
 
Christian Weiske Christian Weiske
owner

History