Typo3:如何将数据插入到带有 powermail 的钩子中的数据库中 [英] Typo3: How to insert data into database in a hook with powermail
本文介绍了Typo3:如何将数据插入到带有 powermail 的钩子中的数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将数据插入到数据库的一列中.
I need to insert data into a column in the database.
我应该使用哪个钩子?
如何插入数据?
我对 powermail 如何与钩子一起工作感到非常困惑.
I'm very confused over how powermail works with hooks.
推荐答案
例如,你可以使用这个钩子:PM_SubmitBeforeMarkerHook
,它包含$sessionData
,有提交的数据.
For example, You could use this hook : PM_SubmitBeforeMarkerHook
, it contains $sessionData
, with submitted data.
ext_localconf.php
ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['powermail']['PM_SubmitBeforeMarkerHook'][$_EXTKEY] = 'EXT:'.$_EXTKEY.'/Ressources/Private/PHP/Hooks/powermail/class.user_PM_SubmitBeforeMarkerHook.php:&user_PM_SubmitBeforeMarkerHook';
class.user_PM_SubmitBeforeMarkerHook.php
class.user_PM_SubmitBeforeMarkerHook.php
<?php
class user_PM_SubmitBeforeMarkerHook {
public function PM_SubmitBeforeMarkerHook (tx_powermail_submit &$pObj, &$markerArray, &$sessionData) {
// Save data
}
}
这篇关于Typo3:如何将数据插入到带有 powermail 的钩子中的数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文