Project

General

Profile

Actions

Feature #15164

closed

HOOK before TCEform is rendered

Added by Thomas Hempel about 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-10-31
Due date:
% Done:

0%

Estimated time:
PHP Version:
4
Tags:
Complexity:
Sprint Focus:

Description

Hi,
In order to implement my dynaflex extension a little bit more elegant, it would be nice to have a hook that can be called before the TCEform is rendered.
The best would be, if the hook is available right after the TCA for the element is loaded.
Is this possible for the next version (4.0) and do you need a patch for that?

Greets and thanks in advance,
Thomas

(issue imported from #M1746)


Files

class.t3lib_tceforms.php.patch (705 Bytes) class.t3lib_tceforms.php.patch Administrator Admin, 2005-10-31 15:06
Actions #1

Updated by Sebastian Kurfuerst about 19 years ago

Hi,
it would be great if you could attach a patch for the hook here.
Thanks,
Sebastian

Actions #2

Updated by Thomas Hempel about 19 years ago

Hi Sebastian,
here it is. ;-) This patch adds two hooks to the method "getMainFields" in the tceforms class.

The hook class is called "getMainFieldsClass" so hooks can be registered with a line like this in the ext_localconf.php: $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'][] = 'EXT:my_extkey/class.tx_myextkey_tcehooks.php:tx_myextkey_tcehooks';

The hooks are called "getMainFields_preProcess" which are called before the form is rendered and "getMainFields_postProcess" which is called afterwards.

Both methods get the same arguments:
TCA: the current TCA (passed by reference!!!)
table: the name of the table of the content record
row: the current DB record (passed by reference!!!)
pObj: the TCEforms object

I Hope I got the right position for this hook. ;-)

Greets,
Thomas

Actions #3

Updated by Michael Stucki almost 19 years ago

Implemented in CVS.

Actions

Also available in: Atom PDF