[TYPO3-core] t3lib_BEfunc::getProcessedValue hook fixes

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Fri Nov 17 12:54:09 CET 2006


Bernhard Kraft schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Martin Kutschker wrote:
> 
> 
>>There was a consensus not to add new hooks into 4.0.x
>>
> 
> 
> This isn't a NEW hook - it is already there

Ah, sorry.

 >. I am just modifying it as the
> current situation makes no sense you do not even know the table for which
> you are rendering a field value inside the hook ....

By the way, the same is true for this hook:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass']

In t3lib_befunc we have this definition:

function getFlexFormDS($conf, $row,$table,$fieldName='',$WSOL=TRUE)

The inline docs says that $fieldName is optional - and therefore NO call in 
the Core sets the parameter. But this is bogus as a table may contain more 
than one flexfield (eg tt_content with TV). The $fieldName MUST be set 
otherwise you don't know what to do with the DS.

Proposal:

Add the $fieldName to all calls. Additionally make it mandatory in 4.1 (so 
extensions have to play the game correctly).

Another problem is the purpose (and history) of the hook. The inline 
comment states that is shall allow the changing of a DS with Typoscript. 
But for this the hook is misplaced. getFlexFormDS() is not only called by 
TCEforms, but by TCEmain, transferdata and even the import/export extension.

Proposal:

Add another hook for that purpose where it belongs: 
t3lib_TCEforms->getSingleField_typeFlex()

Note:

Hook or no hook I think that we need a built-in TS way to configure flex 
form fields like we can for ordinary TCA fields. IMHO this can be 
considered as HCI issues as eg blinding of fields not needed usuall 
improves the UI experience for users.

Masi



More information about the TYPO3-team-core mailing list