Execute code upon content-changes in TYPO3

北城以北 提交于 2019-12-10 12:19:09

问题


Is it possible to notice if the content changed in the Backend and then, for example, to send a mail?

In other words, can I somehow notice who modified the contents in the backend and then automatically send an email?


回答1:


Yes. When content is changed in the backend, several hooks are called before and after the database operations. You can register for each of those hooks. The class you want to have a look at for the right hook is \TYPO3\CMS\Core\DataHandling\DataHandler.

You can e.g. register a class for the processDatamap_afterDatabaseOperations hook by adding the class name to the array

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']

in your ext_localconf.php.

You can find more about hooks in TYPO3 here: https://usetypo3.com/signals-and-hooks-in-typo3.html



来源:https://stackoverflow.com/questions/38131327/execute-code-upon-content-changes-in-typo3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!