[Typo3-dev] processDatamap hook

Josef Peterhans gonfidentschal at yahoo.com
Fri Apr 22 00:22:19 CEST 2005


in order to have the newly inserted id, i have changed
insertDB to return the new id instead of void. and
bool false on error.



and to be informed of deletes as well i have added in
deleteRecord()

after 
				if (!$GLOBALS['TYPO3_DB']->sql_error())	{
$this->log($table,$uid,3,0,0,'');


this code:


						// Hook: processDatamap_postStore
					global $TYPO3_CONF_VARS;
					$hookObjectsArr = array();
					if (is_array
($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']))
{
						foreach
($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']
as $classRef) {
							$hookObjectsArr[] =
&t3lib_div::getUserObj($classRef);
						}
					}
					foreach($hookObjectsArr as $hookObj)	{
						if (method_exists($hookObj,
'processDatamap_postStore')) {
							$hookObj->processDatamap_postStore('delete',
$table, $uid, $fieldArray=array(), $this);
						}
					}


and i return a bool status code instead of void.



--- Josef Peterhans <gonfidentschal at yahoo.com> wrote:
> in class.t3lib_tcemain.php on like 603 (typo 3.7.0)
> i have added this
> 
> 								// Hook: processDatamap_postStore
> 							foreach($hookObjectsArr as $hookObj)	{
> 								if (method_exists($hookObj,
> 'processDatamap_postStore')) {
> 									$hookObj->processDatamap_postStore($status,
> $table, $id, $fieldArray, $this);
> 								}
> 							}
> 
> 
> 
> right after the insertDB() and updateDB() calls. is
> that going to be included in the distribution?
> somehow?
> 
> 
> josef
> 
> 
> 
> 
> --- Josef Peterhans <gonfidentschal at yahoo.com>
> wrote:
> > there are pre and postProcessFieldArray. how about
> > postWrite, a callback for when the db action has
> > been
> > done?
> > 
> > then we'd also have the id for an insert
> > (auto_increment). 
> > 
> > regards, 
> > josef
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > _______________________________________________
> > Typo3-dev mailing list
> > Typo3-dev at lists.netfielders.de
> >
>
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> > 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
>
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the TYPO3-dev mailing list