diff --git a/Classes/Controller/ActionController.php b/Classes/Controller/ActionController.php index 144d412..1c2addc 100644 --- a/Classes/Controller/ActionController.php +++ b/Classes/Controller/ActionController.php @@ -18,6 +18,7 @@ use \Opis\JsonSchema\{ use TYPO3\CMS\Core\Cache\CacheManager; use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController as BaseController; use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder; use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper; @@ -206,6 +207,42 @@ class ActionController extends BaseController $this->arguments->addNewArgument('submit', 'string', false, false); } + /** + * shortcut + * + * @return void + */ + protected function getExtensionKey() + { + return $this->request->getControllerExtensionKey(); + } + + /** + * shortcut function to recieve typoscript + * + * @return array + */ + protected function getPluginTyposcript() + { + return $this->configurationManager->getConfiguration( + ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, + str_replace('_', '', $this->getExtensionKey), + $this->request->getPluginName() + ); + } + + /** + * shortcut function to recieve typoscript + * + * @return array + */ + protected function getTyposcript() + { + return $this->configurationManager->getConfiguration( + ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS + ); + } + /** * shortcut to get to know if request is submittet via post *