[TYPO3-mvc] proposal: static TCA select items as value objects

Martin Kutschker masi-no at spam-typo3.org
Sat Mar 6 18:05:13 CET 2010


Hi!

I've changed the dance of my Ballroom Dancing extensions to use a TcaSelectItem class for the "type"
property (standard, latin or other).

The type objects are create by a (general) TcaSelectItem factory. Right now I have only one factory
which expects the class and property names as values, but in theory it could be turned into an
abstract class with "auto-configuration" (via the class name) just like the repositories.

The two issues I see with the current code are that you must override _setProperty in your models so
the TCA-select properties can be thawed correctly. The other one is that it may be a bit unclean to
do the translation of the labels in the factory. BTW, in the FE you can set up your own labels
defaulting to the BE ones of the TCA.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list