[TYPO3-mvc] Single table inheritance (extbase)

Jochen Rau jochen.rau at typoplanet.de
Tue Dec 29 15:40:08 CET 2009


Hi Franz.

schrieb Franz Koch:
>> I don't intend to implement support for traits/mixins in this first step
>> (e.g. a class extends multiple classes on the same hierarchical level).
>> Those are really complicated to deal with and I am not sure if we should
>> support traits/mixins at all.
>
> I'm just wondering how it would work to extend a existing table with a
> new field. Let's say I need the field 'customerNumber' for fe_users. How
> would I tell extensions dealing with fe_users that this field is now
> available and how could I use it in my templates when there are no magic
> setters and getters? Extend the class by a custom class and remap the
> table fe_users to my model via TS?
> What about having two extensions dealing with fe_users and each of it
> extend the fe_user table by a custom field that is needed to be
> displayed in both extensions? Will that ever work?

Possibly not in 4.x. Traits and mixins seem to be a feature for FLOW3 
and it's AOP framework.

> Thinking about this I think at least implementing magic setters and
> getters is a mustHave feature. I know that there is a reason for not
> using those (comments are used for validation configuration etc.) - but
> I fear loosing this possibility (which in worst case could be done by
> xclassing in v4) will sooner or later stop people from using extbase or
> flood TER even more with "enhanced_xyz_extensions".
> Or if magic setters/getters are no option, provide a api to extend
> objects with new setters/getters (maybe via TS) using the reflection API
> from flow3 or something.

Let's have some experiences with real use cases.

There will always be some missing features in Extbase as Extbase is a 
bridge to FLOW3 but not FLOW3 itself.

Regards
Jochen



-- 
Every nit picked is a bug fixed



More information about the TYPO3-project-typo3v4mvc mailing list