[TYPO3-core] RFC #17422: Forgotten parameter $formData in tsilb_content_CONTENT
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Feb 16 21:43:19 CET 2011
Steffen Gebert schrieb am 16.02.2011 20:16:
>> Providing some more explanation makes reviews easier. BT entry contains
>> some info:
>> > $formData is not forwarded to tslib_content_Content->render($conf,
>> > $formData) in class.tslib_content.php
>
> +1 by reading, looks pretty obvious, as tslib_content_Form->render()
> accepts two parameters, contrary to other content objects:
>> public function render($conf = array(), $formData = '')
>
> Can you provide a "how to reproduce", please?
Form 4.4's phpdoc header of the FORM method:
/**
* Rendering the cObject, FORM
*
* Note on $formData:
* In the optional $formData array each entry represents a line
in the ordinary setup.
* In those entries each entry (0,1,2...) represents a space
normally divided by the '|' line.
*
* $formData [] = array('Name:', 'name=input, 25 ', 'Default
value....');
* $formData [] = array('Email:', 'email=input, 25 ', 'Default
value for email....');
*
* - corresponds to the $conf['data'] value being :
* Name:|name=input, 25 |Default value....||Email:|email=input,
25 |Default value for email....
*
* If $formData is an array the value of $conf['data'] is ignored.
*
* @param array Array of TypoScript properties
* @param array Alternative formdata overriding
whatever comes from TypoScript
* @return string Output
*/
function FORM($conf,$formData='') {
So basically this means that PHP extensions could call FORM method and
pass it some setup to generate a form as an array (better structure than
the "data" syntax with lines, pipes and stuff).
I've never used it, core doesn't use it, and I don't know any extension
doing that: But there might be one! And I just created one to test this
feature (attached to the bug tracker). Patch makes it work again.
+1 by reading and testing.
No brainer, so I committed it to:
- trunk, rev 10472
- TYPO3 4.5 (for 4.5.1), rev 10473
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list