[TYPO3-dev] Sensible usage of hook tslib_content_getDataHook or not?

Dmitry Dulepov [typo3] dmitry at typo3.org
Tue Sep 9 09:51:36 CEST 2008


Hi!

Francois Suter wrote:
> 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.

Use registers. $GLOBALS['TSFE']->register['tx_extkey_name'] from the code and "data = register:tx_extkey_name" from TS.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/




More information about the TYPO3-dev mailing list