[TYPO3-dev] t3lib_befunc::getFlexFormDS() and it's hook
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Tue Nov 14 17:50:57 CET 2006
This function has a hook to post-process the DS. The author of the hook
added a way to pass the field-name to the hook, unfortunately noone ever
cared to ADD this info to the call. So the hook will never, ever know what
field it operates on. Drats.
Furthermore this comment in the code is misleading:
// Hook for post-processing the Flexform DS. Introduces the possibility to
configure Flexforms via TSConfig
Nice idea, but getFlexFormDS() is called for various reasons. It's called
in TCEform to render the form, but it's also called in TCEmain to validate
the form and also in t3lib_transferdata to some other reasons.
So if the hook was meant for form rendering alone it should be located in
TCEmain. Of course it's nice to be able to modify the DS in other places as
well. But it's a problem when you neither know the context nor the field.
Especially if the function is called more then once during form rendering,
any modification should only be done once.
Did anyone use this hook in real life? I had it once working on 3.8 but on
4.0 (and PHP5) it's all havoc here.
Masi
More information about the TYPO3-dev
mailing list