[TYPO3-english] Call an utility on saving a model table

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Jan 24 15:40:34 CET 2013


Hi,

On 24-1-2013 15:35, Sergio wrote:
> The problem is I would need inside "processCmdmap_postProcess" the whole
> object to be deleted BEFORE it's deleted, to make some calculation. Is
> that possible? I can't see it on "$pObj" parameter.

Take a look inside tce_main, then you'll know what's available.

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'] 
contains the hook objects. For each the following hooks can be used:

- processCmdmap_beforeStart($this)
- for each item: processCmdmap_preProcess($command, $table, $id, $value, 
$this)
- just before each command: processCmdmap($command, $table, $id, $value, 
$commandIsProcessed, $this) (you can set $commandIsProcessed to prevent 
tce_main from doing it)
- after the command: processCmdmap_postProcess($command, $table, $id, 
$value, $this)
- after all commands: processCmdmap_afterFinish($this)

One of these should fit the job I'd think :-)

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list