[TYPO3-project-formidable] Formidable v2.0.418 - getUserObjParams() or getParams() ?
Jérôme Schneider
j.schneider at ameos.com
Fri Oct 30 16:53:32 CET 2009
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