[TYPO3-dev] XCLASS conflict examples

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Sun Feb 12 17:25:50 CET 2006


Michael Scharkow schrieb:
> class tt_news_pi1 extends fe_controller{
>     $this->register = array('index','singleview','latest','search');
>     function index(){
>         return 'foo';
>     }
>     function singleview(){
>         return 'bar';
>     }
>     ...
> }
> 
> myplugin = new tt_news_pi1;
> myplugin->main();
> 

Now the question. How can the extension be extended by new actions?

The XCLASS variant is easy. You don't have to rewrite any switch function.

class ux_tt_news_pi1 extends ux_tt_news_pi1 {
     $this->register = array('rss');
     function rss(){
         return 'rss';
     }
}

/el




More information about the TYPO3-dev mailing list