[TYPO3-mvc] Problem with Property mapping
Eike Starkmann
starkmann at undkonsorten.com
Tue Jan 6 12:48:08 CET 2015
Hi Helmut,
Am 23.12.2014 um 01:20 schrieb Helmut Hummel:
> The target type for property mapping is determined by the action method
> argument type. Thus, it is always set to \Something\A. But you can
> optionally pass the type information and the object converter will then
> take care to set the target type accordingly:
>
> <f:if condtion="a.type=tx_..._b">
> <f:form.textfield property="b" />
> <f:form.hidden name="tx_yourplugin[a][__type]"
> value="\Wall\Domain\Model\B" />
> </if>
>
> See:
> https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php#L175
>
that is good to know!
I finally ended up to create for every type one method with the correct
signature and they all use one base method:
public function update(\Something\A $a) {
....
}
public function updateB(\Something\B $b) {
$this->updateAction($b);
}
Thanks for you help, Eike
More information about the TYPO3-project-typo3v4mvc
mailing list