[TYPO3-dev] Read typoscript configuration

Heinz Müller mullerheinz046 at gmail.com
Sat May 10 18:45:37 CEST 2014


Thanks Charles, that's exactly what I was looking for. I tested it in the
controller and it worked, although it didn't work in my model. Is there a
trick to fetch this settings array from there?

Regards

Heinz



On Sat, May 10, 2014 at 6:17 PM, Charles Brunet <charles at cbrunet.net> wrote:

> 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
> >
> _______________________________________________
> 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