[TYPO3-v4] Postponing 4.5 RC1

Steffen Kamper info at sk-typo3.de
Tue Jan 18 20:51:02 CET 2011


Hi,

Am 18.01.2011 20:19, schrieb François Suter:
> Hi,
>
> Oh, I had never noticed the ugly
>
> $GLOBALS['TBE_TEMPLATE'] = t3lib_div::makeInstance('template');
>
> at the end of template.php.
>

old times, a pseudo singleton :)


>> i researched again why i needed template. For extension configuration an
>> instance of t3lib_tsparser_ext is done which needs an instance of
>> template because of silly formWidth() call. maybe i can change that in
>> constructor as it's not needed for quite operations
>
> Another possibility: why not add a constructor to t3lib_tsparser_ext,
> where $GLOBALS['TBE_TEMPLATE'] is loaded with an instance of "template"
> if not already existing?
>
> This places the dependency where it belongs IMO. What do you think?
>

i don't think. This class is just a helper class for BE modules, so it 
use the global template class which is always present in BE. Instancing 
there would be wrong imho.
As ExtDirect server use this instance to get configuration form, it's ok 
to instance it there.
For quite operation this form is never build, so no instance of template 
is needed at all.

vg Steffen



More information about the TYPO3-project-v4 mailing list