get( ConfigurationManagerInterface::class ); $typoscript = $configurationManager->getConfiguration( ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT ); $typoscript = GeneralUtility::removeDotsFromTS($typoscript); $siteConfig = $typoscript; if ($limitToSiteConfig) { $siteConfig = $typoscript['config']['site']; } $current = &$siteConfig; foreach ($pathParts as $key) { $current = &$current[$key]; } if (is_array($current) && array_key_exists('value', $current) && count($current) === 1 ) { $current = $current['value']; } return $current; } /** * Gets extension config by typoscript path * * @var string $path * @return string */ public static function getFromExtensionByPath( $extensionName, $path ) { $pathParts = explode('.', $path); $objectManager = GeneralUtility::makeInstance( ObjectManager::class ); $configurationManager = $objectManager->get( ConfigurationManagerInterface::class ); $typoscript = $configurationManager->getConfiguration( ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName ); $current = &$typoscript; foreach ($pathParts as $key) { if ( !is_array($current) || !array_key_exists($key, $current) ) { return null; } $current = &$current[$key]; } return $current; } }