TYPO3中内容更改时执行代码 [英] Execute code upon content-changes in TYPO3

查看:59
本文介绍了TYPO3中内容更改时执行代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以注意到后端中的内容是否发生更改,然后例如发送邮件?

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?

推荐答案

是.当后端中的内容更改时,在数据库操作之前和之后都会调用多个挂钩.您可以为每个钩子注册.您要查看右钩子的类是\TYPO3\CMS\Core\DataHandling\DataHandler.

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.

您可以例如通过将类名添加到数组中,为processDatamap_afterDatabaseOperations钩子注册一个类

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']

在您的ext_localconf.php中.

您可以在此处找到有关TYPO3中钩子的更多信息: https://usetypo3. com/signals-and-hooks-in-typo3.html

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

这篇关于TYPO3中内容更改时执行代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆