[TYPO3-mvc] Best way to convert "tx_ext_domain_model_foo:1" into object?
Tim Schoch | GSTALTIG
tim.schoch at gstaltig.ch
Thu Mar 15 15:25:13 CET 2012
Hi Bastian
I have several models extending a base model and implementing its interface.
(I guess this is called decorator pattern?)
Which "enhancement" should be chosen depends on some values entered in the BE form.
The enhanced models don't need an own repository, they can be fetched with the base model's repository.
In my controller I now want to get the matching object by determining what class should be used and call
«$show = getObjectByIdentifier( 'class_name:' . $show->getUid() )»
($show is the object passed to the show view, mostly the base model)
Usually I would do this with a factory class, but I don't know where in extbase this could be achieved.
Tim
More information about the TYPO3-project-typo3v4mvc
mailing list