Reputation: 2247
I need to insert data into a column in the database.
Which hook should I use?
How can I insert the data?
I'm very confused over how powermail works with hooks.
Upvotes: 1
Views: 1721
Reputation: 3631
Just as addition: Powermail is able to create or edit tables in the database on its own. You can f.e. create tt_news records via powermail just by define the mapping via TypoScript. Have a closer look into the manual for that.
Upvotes: 0
Reputation: 9974
For example, You could use this hook : PM_SubmitBeforeMarkerHook
, it contains $sessionData
, with submitted data.
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
<?php
class user_PM_SubmitBeforeMarkerHook {
public function PM_SubmitBeforeMarkerHook (tx_powermail_submit &$pObj, &$markerArray, &$sessionData) {
// Save data
}
}
Upvotes: 1