[TYPO3-dev] Instantiation of backend modules/classes
Franz Holzinger
franz at ttproducts.de
Fri Jun 24 22:08:46 CEST 2011
Hello Rik,
On 24/06/11 13:47, Rik Willems wrote:
> 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).
this is not possible. The XCLASS hook comes in the file
ext_localconf.php. At this position you have no information about which
PHP code will call the class which you are XCLASSing.
You should write your new XCLASS in a way that it supports also the
features of the older class.
You can use a static class in your extension which the backend module
calls to activate a switch in your XCLASS file.
If you only want that one module uses your XCLASS, then it would be
better to copy the complete code of the page tree of TYPO3 into your
extension and rename the files and classes. And then call the PHP tree
of your extension directly from that module. Then you need no XCLASS at all.
Or maybe you should better try to use a hook or make a new hook proposal
in the core list. Otherwise you would be forced to rewrite your
extension with every new version of TYPO3.
- Franz
More information about the TYPO3-dev
mailing list