[TYPO3-dev] using typoscript setup in hook of extension
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Aug 20 19:13:03 CEST 2008
Steffen Müller wrote: on 20.08.2008 17:42:
> I try to code an extension A, which makes use of a hook in the plugin of
> another extension B.
> There is some typoscript setup in extension B and I like to use these
> values inside a function of the extension A.
> Additionally, I like to set some more values by the typoscript setup of
> extension A.
>
> For regular plugins there is
> $this->conf=$conf;
> in function main()
>
> What is the proposed way to do this inside a hook function?
A hook call might pass down to the hook implementations the pObj (parent
object), which in this case might be the B-plugin, so you could access
$pObj->conf (and you might even "modify" those, if you wish).
If the hook does not include the pObj, you will have to resort in
finding the setup in $GLOBALS['TSFE']->tmpl->setup like Francois
suggested, but you will not know which context your plugin was called.
Cheers,
Ernesto
More information about the TYPO3-dev
mailing list