[TYPO3-mvc] Possibility to let Extbase-Ext return an array?

Sebastian KurfŸürst sebastian at typo3.org
Thu May 28 18:59:52 CEST 2009


Hey Jörg,

> how is it possible or is it at all possible to include an action, which 
> returns an array for a menu-array with an extbase-extension?
That does not really make sense. Actions and controllers are a special 
concept of MVC, while you just need a normal PHP class.

> <example>
> temp.menu = HMENU
> temp.menu.special = userfunction
> temp.menu.special.userFunc = Tx_ExtExample_Controller_Category->menuAction
> </example>
Just use a standard PHP class which has a name like 
Tx_ExtExample_MenuGenerator and create a method named "generateMenuItems".
The above class must reside in ext_example/Classes/MenuGenerator.php.

With the above concept, you do not use the MVC framework of extbase for 
this particular problem, but that's fine (because what you want to do 
does not fit into the MVC concept).

I hope this helps :-)
Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list