[TYPO3-mvc] How to implement a selectfield/SPLobjectArray containing different object types?

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Dec 29 15:54:00 CET 2009


Hi again,

> My problem is now, that there are not only articles that can be assigned
> to a page, but also other content elements (like article-sets and in
> future probably more). And now I don't know how I should handle this. My
> idea was now to add a property "content" (type array?) to my page
> objects and let it contain any of the needed content elements - so
> speaking in TCEforms a group-field where different tables are allowed to
> be selected.
>
> But how to correctly implement this in the extBase way? Should I add a
> method "getContentElements" to my page model and do all the magic there
> by calling a repository (which one to use btw - a pageRepository with a
> according method?).
> Or should I better use a dedicated SPLobjectArray for each contentType?

I'm still struggling with this last problem I've got in the concept 
phase of my db-scheme/model. I need a way to assign various content 
types to my page models, where "content types" are not like in TYPO3 
based on a single table, so no single table inheritance, but can be 
selected from different tables. So just like in the TYPO3 content 
element "insert records", where you can select tt_content, tt_news, etc.


Is extbase up to this? And if so, how to do? Just by setting up the TCA 
accordingly? But how to map classes to those records then? Or can 
someone point me to the correct documentation? I can't read the stuff in 
the extension doc_extbase (don't have a docbook reader - still 
searching) and the api-reference in there didn't help.

-- 
kind regards,
Franz Koch

---------------------------------------------------
PayPal-Account: 'paypal _at_ elements-net _dot_ de'
---------------------------------------------------


More information about the TYPO3-project-typo3v4mvc mailing list