[TYPO3-dev] Sensible usage of hook tslib_content_getDataHook or not?
Steffen Kamper
info at sk-typo3.de
Mon Sep 8 18:31:26 CEST 2008
Hi Francois,
Francois Suter schrieb:
> Hi all,
>
> In one of my extensions I need to access some extra data inside a
> getText function. One possibility is to put my stuff into $GLOBALS and
> get it with a syntax like:
>
> someproperty.stdWrap.data = global:MYSTUFF|index1|index2
>
> This works ok, but I was wondering if stuffing things into $GLOBALS was
> such a good idea.
>
> Another possibility is to put my stuff in a more special place (like in
> the current instance of tslib_content that I'm using) and extracting it
> using the tslib_content_getDataHook hook that is in
> tslib_content::getData().
>
> This seems cleaner but has the drawback that the hook gets called every
> time getData() is called, which seems like an important overhead to me.
>
> Any opinions on this?
>
> Cheers
>
only a quickshot - usage with user_func?
vg Steffen
More information about the TYPO3-dev
mailing list