[TYPO3-core] RFC: Move the BE logo generation code into a separate method so it can be used from other classes

Ingo Renner ingo at typo3.org
Wed Oct 17 13:07:49 CEST 2007


Benjamin Mack wrote:
> Hi Ingo,
> 
> IMHO the new created function should be separated from the rendering of 
> the page. I don't like the
> 
> if (!$GLOBALS['includeClassOnly']) {
> 
> use.

me neither but to me it's the fastest and most save way it can be done 
without braking stuff...

besides that there're more of such situations were it'd be nice to just 
reuse a TYPO3 core class but you can't because they immediately get 
executed, too if youn include them (file and record listing f.e.)

> What about creating a "class.logo.php" that goes in the typo3/classes or 
> the typo3/include directory (where all new classes should be stored 
> anyways, to clean up the typo3/ directory :) ) ?

sure, the only thing is that we can't really remove stuff from a file 
because of the holly cow... you never know who xclassed or missused the 
class in whatever way...

> Put the class in a separate file, include it and the alt_toplogo.php is 
> almost only a stub to only include the class file and instantiate it - 
> that's what I'd call a clean up.

I would be perfectly fine with that if we can agree on it with a couple 
more people...

Ingo






More information about the TYPO3-team-core mailing list