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

Joerg Schoppet joerg at schoppet.de
Thu Jun 18 18:38:31 CEST 2009


Hi Sebastian,

Sebastian KurfŸürst schrieb:
> 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 though a little bit about that, and after all I can't confirm your statement, that
this does not fit into the MVC concept.

I created a product-extension, with has the following main entities:
1 Category can contain x Products
1 Product is assigned to 1 Category

The standard Controller:Action is to display a ul-list of the categories.

Now, I "only" want to have the output (view) in another way. So I still have the controller,
the models, and only an other view, which IMHO perfectly fits into the advantages
of MVC-pattern. Or doesn't it?

So all the possible different outputs are only different views in a MVC approach, e.g.:
- html-output (actually)
- csv-output
- xml-output
- json-output
- php-array-output
- ...


Joerg


More information about the TYPO3-project-typo3v4mvc mailing list