[TYPO3-mvc] Executing code after data has been persisted?

Stefan Isak stefanisak at googlemail.com
Wed Jun 1 15:41:48 CEST 2011


Hi,

you can inject the persistenceManager to you controller and invoke persistAll() when you need to persist all data.

/**
 * DI extbase persistence manager
 *
 * @param Tx_Extbase_Persistence_Manager $persistenceManager
 */
public function injectPersistenceManager(Tx_Extbase_Persistence_Manager $persistenceManager) {
	$this->persistenceManager = $persistenceManager;
}

public function myAction() {
	$this->persistenceManager->persistAll();
...
	Tx_My_Services_Mail::send($whatEver);
}
	
Cheers
Stefan

On Jun 1, 2011, at 3:31 PM, François Suter wrote:

> Hi all,
> 
> In an Extbase plugin, I need to perform some action after the input data was persisted. Namely I want to send a mail with a link pointing to the newly entered data. At which point is the data actually persisted and is there an API that allows to perform some action after that point?
> 
> Thanks in advance for pointers
> 
> -- 
> 
> Francois Suter
> Cobweb Development Sarl - http://www.cobweb.ch
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list