[TYPO3-mvc] [!!!] FYI: Implemented first version of single table inheritance.

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Wed Apr 21 22:37:55 CEST 2010


Very cool, works like a charme here - didn't test to update objects,
but reading and displaying them in the frontend works well so far.

One thing which came in my mind while exploring further approaches:
Dependend/specific propteries based on the model type.

As I now have the possibility to define a model/object type, it would be 
interesting to have type-specific properties inside a model.

Example:

I got a parent-model 'product' and sub-models like 'car', 'book' etc. In 
the backend I can control which fields to show up, by settings the 
according type field array in the TCA. Now I got a property 'articles' 
which can be assigned (as IRRE) to the product, may it be a book, a car 
or whatever type I select. Further it would be nice to make the type of 
the articles dependent on the product type. Like when I select the 
product to be a book, the articles I create (IRRE) should hold specific 
properties (or show specific fields in the backend) which are only 
related to a book object. Maybe the book is a bad example, but take e.g. 
apparel/clothing. I would add a 't-shirt' product of type 'apparel' and 
assign several articles which differ in color, size and price. While the 
price may be present in all articles, color and size may only make sense 
to be used in a apparel/clothing article. Do you get my point?

Is this already possible somehow, to configure TYPO3 via TCA to use the 
desired article types (the article table would also need a type field 
therefor I guess) automatically when switching the type of the product?

Thanks for ideas,
Thomas


Am 21.04.2010 15:58, schrieb Jochen Rau:
>> Ok. Give trunk a try. Don't forget to define your subclasses.
>
> ah. And don't forget to define a recordType = ClassName for each of your
> Classes.
>
> Jochen


More information about the TYPO3-project-typo3v4mvc mailing list