[TYPO3-core] RFC: New feature: Add custom FORM fields using hooks (mainly used for captcha)

Michael Stucki michael at typo3.org
Mon Aug 28 18:12:11 CEST 2006

Hi Dmitry,

> Michael Stucki wrote:
> > Add two hooks to add custom fields dynamically and to check the submitted
> > values with an extension.
> I would more like this:
> 	$_procObj->checkDataSubmission($this, $params);
> than current:
> 	$_procObj->_params = &$params;
>   	$_procObj->checkDataSubmission($this);
> PHP allows variable number of parameters for functions. It looks cleaner
> and more traditional when parameters are passed to hooks rather than set
> to object. And it stays compatible with existing hooks (if any).
> What do you think?

I thought about that, but it does not work because the hook already exists, 
and it only accepts one parameter ($this).

In the above example, the modified hook would call the checkDataSubmission() 
method with two parameters although it only accepts one.

I don't see how to do this without breaking the compatibility.

- michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060828/81c06867/attachment.pgp 

More information about the TYPO3-team-core mailing list