[TYPO3-dev] Call a function after adding a content_element

Mario Matzulla mario.melanie at arcor.de
Tue Feb 28 13:42:49 CET 2006


Hi Micha,

Michael Feinbier schrieb:
> Hi everybody,
> 
> I want do develop a small extension. This extension should contain a
> plugin which should do some action (i.e. sending E-Mails) after adding
> or changing the Plugin in the Web-Module of the Backend.
> 
> How can I realize that? My idea was to write a hook which is called
> after the adding or changing a content element (plugin) in the BackEnd.
>  Is that a good Idea? Where can I find the class, which makes the
> entries  into tt_content? And is there a possibility to insert a hook?
> 
> Or is there a smarter way to do it?

You have to write a hook for tcemain_processdatamap.

I did it like this:

class tx_cal_tcemain_processdatamap {
	function processDatamap_postProcessFieldArray($status, $table, $id,
&$fieldArray, &$this) {
		if ($table == 'tx_cal_event') {
			$row = t3lib_BEfunc::getRecord ($table, $id);
				//do what you want to do
			}
   		}
	}
}

[...]
}

Regards,
Mario
> 
> Hope you understand, what I mean :-)
> 
> Thanks
> 
> 
> Micha




More information about the TYPO3-dev mailing list