[TYPO3-mvc] Mixin support for Extbase 6.0
Tymoteusz Motylewski
t.motylewski at gmail.com
Thu Jul 26 23:43:14 CEST 2012
Hey,
During Extbase sprint in Stuttgart last week, we discussed
implementation of mixins in Extbase.
What are mixins? Basically, they are kind of php "snippets" which can be
added to the existing classes. A tipical usecase would be to add
additional field to existing model e.g. gender to fe_user.
I would like to get some feedback about this feature, your expectations
and potential use cases. As FLOW3 doesn't have mixins, it's also very
important for me to gather opinions about implementation with FLOW3
experts. Especially to agree on configuration structure.
Initial implementation should be simple - small step, but in the good
direction :) Later we can drop some usage restrictions and add
functionality.
So, I would like to hear your opinion on ideal and realistic-"1.0"
implementation:
a). How should mixin support work ideally (this is a direction), how to
handle inheritance of mixed classes and overriding mixed classes with DI.
b). What should be included (what usage restrictions are acceptable) in
initial implementation
Here are some requirements we gathered during sprint:
1. Conflicts (between mixins, or between mixin and original class) will
not be resolved and will result in error.
2. Mixin code will be added to the end of the original class file, and a
file with new version of this class will be stored.
3. Object Manager has to include file with mixin instead of original file.
4. One class can have multiple mixins attached.
5. The configuration might look like this: - please see [1]
Cheers
Tymek Motylewski
[1] http://forge.typo3.org/issues/39305
More information about the TYPO3-project-typo3v4mvc
mailing list