[TYPO3-dev] using typoscript setup in hook of extension
Steffen Kamper
info at sk-typo3.de
Wed Aug 20 20:12:32 CEST 2008
Ernesto Baschny [cron IT] schrieb:
> 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
I only can underline Ernesto's post. I hope that all extension hooks
implement the pObj to allow complete manipulation.
$GLOBALS['TSFE']->tmpl->setup can vary on each page and isn't reliable.
vg Steffen
More information about the TYPO3-dev
mailing list