How to access typoscript settings data or flexform setting data in typo3 extension
We can easily get setting data in controller file by using following code
If we want to get that data in other files like repository, service that we need to use following code
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager'); $configurationManager = $objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface'); $setting = $configurationManager->getConfiguration( \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS );
Just print the $setting and you will get all typoscript settings data.
I hope above code will work for you and made your day 😉 enjoy 🙂
If you have any queries, please do not hesitate to contact me at Jainish Senjaliya