[TYPO3-dev] Read typoscript configuration

Charles Brunet charles at cbrunet.net
Sat May 10 18:17:55 CEST 2014


Put your settings in TypoScript setup like

plugin.tx_myextension.settings {
    foobar = 1
}

and your will automatically be able to access it from

$this->settings['foobar']

as well as from settings variable in Fluid templates.

Charles.

*Charles Brunet, B. Ing.*
Webmestre.
Étudiant au doctorat, génie électrique, Université Laval.


2014-05-10 12:09 GMT-04:00 Heinz Müller <mullerheinz046 at gmail.com>:

> Hi all,
>
> I wrote a little extension and now I would like to make it configurable
> through typoscript.
>
> I have this typiscript:
>
> plugin.tx_myextension {
>   foobar = 1
> }
>
> and I want to read it inside one of my model classes. I have tried several
> things like
>
> $values = $this->settings['foobar'];
>
> or
>
> $values = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_myextension'];
>
> or even
>
> $extbaseFrameworkConfiguration =
>
> $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
>
> $values = $extbaseFrameworkConfiguration['foobar'];
>
>
> but I am loosing the overview here because I find many similar approaches
> on the web but no clear and simple description on how to achieve this.
>
> Thanks a lot for any help.
>
> Heinz
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list