[TYPO3-project-formidable] Formidable v2.0.418 - getUserObjParams() or getParams() ?
Uwe Schmelzer
us at planungsgruppeinternet.de
Fri Oct 30 19:04:21 CET 2009
Hi Jérôme,
thanks for your answer!
Have a nice weekend.
uwe
--
Herzliche Grüsse aus Sindelfingen
Uwe Schmelzer
us at planungsgruppeinternet.de
Planungsgruppe Internet
Parkstrasse 20
71063 Sindelfingen
Tel. 07031 / 704 089
Fax: 01805 / 233 633-00745
Jérôme Schneider schrieb:
> Hi Uwe !
>
> You're right, getParams() is now a wrapper for getUserObjParams(). The
> reason is that now formidable offers more ways to execute code that just
> userobj's thus the name did not fit anymore. I would recommend that you
> use getParams() instead, as if any improvements concerning parameters
> are made in the future, they'll be done in getParams().
>
> Concerning your 3., that's a change we decided to introduce in an effort
> to simplify and add consistency to the whole parameter-handling in
> formidable (in validators, events or callback methods, on php-userobj,
> php-codebehind or js-codebehind, ...). As a drawback, the passed
> parameters have changed (for validators). I apologize for the
> compat-problems it introduced, sincerely.
>
> Thanks for caring,
> Jerome Schneider
>
> Uwe Schmelzer a écrit :
>> Hi list,
>>
>> as of formidable v2.0.418, should I use
>> $this->getUserObjParams() or $this->getParams() ?
>>
>> Additional infos:
>>
>> 1. Context:
>> <renderlet:TEXT name="foo" label="bar" class="input-text">
>>
>> <validators>
>> <validator:STANDARD>
>> <custom>
>> <message>Wrong input</message>
>> <userobj>
>> <php><![CDATA[
>>
>> $aData = $this->getUserObjParams();
>> $stornoCode = $aData['value'];
>> ]]></php>
>> </userobj>
>> </custom>
>> </validator:STANDARD>
>> </validators>
>> </renderlet:TEXT>
>>
>>
>> 2. I am aware, that currently
>> getParams() is just a wrapper function for getUserObjParams()
>> as seen in Line 5784 of class.tx_ameosformidable.
>> So I might as well use it.
>>
>> 3. Change of return value?
>> Before v2.0.418, I used it like this:
>> $aData = $this->getUserObjParams();
>> $stornoCode = $aData['value'];
>> But now, the return value seemed to have changed
>> from array to string. E.g.:
>> $fieldvalue = $this->getUserObjParams();
>> $stornoCode = $fieldvalue;
>>
>>
>> grtz uwe
>>
>>
More information about the TYPO3-project-formidable
mailing list