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

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Dec 22 15:56:13 CET 2009


Hi Masi,

>> 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.
>
> Is this related to a problem like how to store different products in a store? I mean all products
> have an id and a name, but only books have a author/ISBN, only movies have a director, etc.

not exactly the same, for now I planned to use two separate tables for 
these, as in my case article-sets themselves contain articles and need 
some special treatment I think (at least the repository). But I already 
considered using a single table and a type-field - but I'm not sure yet. 
In doubt I use the easiest way to implement, because I at least need the 
backend masks ready to use on january first, so that the customer can 
start filling the DB. So I'm quite in a hurry :(

> I am planning to implement such a scheme and my first idea was to use a base class "product". But I
> have no idea how I can make this match with TCA types.

In future I might also have the need of different product types that 
share certain information, because a shop feature might be some future 
plan for that website.
There is a first concept to solve your problem in the topic "[TYPO3-mvc] 
Single table inheritance (extbase)" started by "Kristian Nygaard Jensen" 
on 2009-12-17.

-- 
kind regards,
Franz Koch

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


More information about the TYPO3-project-typo3v4mvc mailing list