Project

General

Profile

Actions

Feature #14564

closed

Hooks in t3lib_tcemain::process_cmdmap (with patch)

Added by Tim Franz about 19 years ago. Updated almost 18 years ago.

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

0%

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

Description

It would be nice to have also hooks in t3lib_tcemain::process_cmdmap.

In combination with the already existing hook in process_datamap are almost all record-related events in the backend controllable. Not only "new" and "update", but also "delete", "move", "copy" and so on.

I have include a diff against head.

(issue imported from #M823)


Files

0000823-class.t3lib_tcemain.diff (1.64 KB) 0000823-class.t3lib_tcemain.diff Administrator Admin, 2005-02-21 14:53
0000823-class.t3lib_tcemain.diff (1.64 KB) 0000823-class.t3lib_tcemain.diff Administrator Admin, 2005-02-24 10:05
Actions #1

Updated by Tim Franz about 19 years ago

Forgot to add global $TYPO3_CONF_VARS; as first line of function. Ouch!

Actions #2

Updated by Ingmar Schlecht about 19 years ago

I just had a very quick look at it, but why does the hook have to be implemented independently for every case?

case 'move':
.....
case 'delete':

Can't you just place the hook after the whole switch statement?

cheers,
Ingmar

Actions #3

Updated by Tim Franz about 19 years ago

originally the hook was implemented different for each case to make it cleaner. each case has different parameters to pass (some with $table, some not). and i thought it would be better to have a hook method for each distinct operation.

I have now changed the method signature to contain always $table (and the command). the hook implementor has to watch out which parameters are really useful for his case.

Now I moved the hook out of the switch statement. There are two calls:
processCmdmap_preProcess (before switch)
processCmdmap_postProcess (after switch)

greetings
Tim

Actions #4

Updated by Michael Stucki about 19 years ago

Ingmar, will you add this patch or should I do so?

Actions #5

Updated by Michael Stucki about 19 years ago

We just discussed the hook situation and decided to ask a few things before we add the hook:
- author name
- what is the reason for wishing this hook
- where is it used

Can you send me this information, please (either here or at )

Actions #6

Updated by Tim Franz about 19 years ago

Well, I did not expect the spanish inquisition...

My name is Tim Franz,
the reason for this hook is already in the bug description: the ability to add additional functions to every record related action in the backend.

I am currently developing a bunch of extensions for the chair of finance and banking, university of essen, managing their whole teaching business within the typo3 backend. For that I need kind of a simple workflow.

For example: A staffmember adds a day of unavailability for him (As a calendar record). All other extensions hook into this and check wether this change affects their data. The course schedule extension adds a note about a dropped lecture (if there woud have been one), The staff list adds a note about a dropped consultation hour. A news item is generated and a newsletter prepared and sent.

This all needs the ability to control all actions possible with a record. If a record is deleted, the other extensions should know about that.

I hope this explanation suffices. Otherwise you are welcome to ask more.
But would you now please tell me the need of this information for the progress of TYPO3?

Greetings
Tim

Actions #7

Updated by Michael Stucki about 19 years ago

Thanks Tim for the explanation. I just committed this to CVS HEAD.

Actions

Also available in: Atom PDF