[TYPO3-mvc] How to get to typoscipt ?

Dawid Pacholczyk dpacholczyk at gmail.com
Wed Jan 26 16:18:29 CET 2011


W dniu 2011-01-12 13:52, Franz Koch pisze:
> Hey,
>
>> If you want to have access to your typoscript from everywhere in your
>> code this snippet from my utility class could be what you're looking for:
>>
>> /**
>> * get the typoscript settings
>> * @return mixed
>> */
>> static function getFrameworkConfig() {
>> // get extension config
>> return Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration();
>> }
>>
>> You'll have to test it in the backend, as I'm only using it in the
>> frontend.
>> Let me know if it works.
>
> Tx_Extbase_Dispatcher will be obsolete as of extbase 1.3.0. To get the
> correct configuration (f.e. in a service that can also be called from
> other extension) you can/should do it somehow like this in extbase 1.3.0
> and above:
>
> /**
> * @var Tx_Extbase_Configuration_ConfigurationManagerInterface
> */
> protected $configurationManager;
>
> /**
> * Injects the Configuration Manager and is initializing the framework
> settings
> *
> * @param Tx_Extbase_Configuration_ConfigurationManagerInterface An
> instance of the Configuration Manager
> * @return void
> */
> public function
> injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface
> $configurationManager) {
> $this->configurationManager = $configurationManager;
> $this->settings =
> $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS,
> 'ExtKeyInUpperCamelCase', 'PluginKeyInUpperCamelCase');
> }
>
>
> If you leave the last two arguments empty (ExtKey and PluginKey) then
> the configuration from the currently used plugin will be loaded. This
> should also work in BE context.
>

I have a question to this code.

Should be class or should I put it into repository if I want to get TS 
in repo ? unfortunatly I`m reading whole conversation again and again 
but I just can`t understand this :/


More information about the TYPO3-project-typo3v4mvc mailing list