[TYPO3-dev] Instantiation of backend modules/classes

Rik Willems rik at actiview.nl
Fri Jun 24 13:47:03 CEST 2011


Hi Jigal,

Thanks for the tip. I noticed the XCLASS but couldn't think of how to 
use it in this situation. I'd like to reuse the pagetree but leave the 
normal pagetree as it is. How can I XCLASS that file only for a certain 
backend module? I'm not too familiar with backend programming (yet).

Cheers!

On 24-6-2011 13:27, Jigal van Hemert wrote:
> Hi,
>
> On 24-6-2011 12:37, Rik Willems wrote:
>> I have noticed that in backend modules the instantiation of classes
>> happen at the bottom of the same file [1]. Now when I want to extend
>> that class for an own extension it's not possible because the class is
>> instantiated upon include of the file.
>
> Why wouldn't it be possible? Just above the piece of code you quote is
> the XCLASS definition:
>
> if (defined('TYPO3_MODE') &&
> isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/alt_db_navframe.php']))
> {
> include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/alt_db_navframe.php']);
>
> }
>
> You can define an XCLASSed version of this class in your own extension.
> The call to t3lib_div::makeInstance() is done just to take XCLASSes into
> consideration.
>




More information about the TYPO3-dev mailing list