[TYPO3-project-formidable] Getting the name of the renderlet in a userobj validator/process
Jerome Schneider
j.schneider at ameos.com
Mon Jun 11 09:41:07 CEST 2007
Hi,
yes I never thought abourt this but there's no other way than specifying
yourselves where you are as a param of the userobj, as Manuel explained.
Note that params can also be declared on inline-php userobjs;
Like this:
<renderlet:BUTTON name="mybtn" label="My button">
<process>
<userobj>
<params>
<param name="rdt" value="mybtn" />
</params>
<php><![CDATA[
$aParams = func_get_arg(1);
return in_array( // for instance
$aParams["rdt"],
$GLOBALS["array_of_rdt_name_to_process"]
);
]]></php>
</userobj>
</process>
</renderlet:BUTTON>
Best regards,
Jerome Schneider
Manuel Rego Casasnovas a écrit :
> Hello.
>
> I know only one way to do this, but I don't know if this is the correct
> way. The XML configuration is the next:
> ...
> <userobj>
> <extension>this</extension>
> <method>_isValid</method>
> <params>
> <param>
> <name>renderlet</name>
> <value>my_renderlet</value>
> </param>
> </params>
> </userobj>
> ...
>
> And the function:
> function _isValid($aParams, $oForm) {
> $renderlet = $aParams['renderlet'];
> ...
> }
>
> The problem is that, in all your renderlets, you have to specify the
> renderlet name in two places, the name and the param for the function
> _isValid.
>
> Bye,
> Rego
>
> --
> http://www.igalia.com
>
>
> Oliver Klee escribió:
>> Hi,
>>
>> in a userobj validator and in a userobj process function, I'd like to
>> know the corresponding renderlet's name (to look up whether a form field
>> has been enabled in the setup and whether it is required).
>>
>> Is there any way for me to retrieve the name of the field in the userobj?
>>
>> Thanks in advance,
>>
>>
>> Oliver
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>>
>>
More information about the TYPO3-project-formidable
mailing list