[TYPO3-dev] Problem with a hook definition

Tapio Markula tapio.markula at xetpoint.fi
Thu Jan 3 12:37:52 CET 2008


Hi

class.tslib_content.php function function start($data,$table='')

has this kind of hook definition:

if (is_array 
($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'])) 
{
			foreach 
($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'] 
as $classArr) {
				$this->cObjHookObjectsArr[$classArr[0]] = 
&t3lib_div::getUserObj($classArr[1]);
			}
		}

I don't understand this kind of hook definition.

1) How I should define 
h$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass']

I have created hooks like
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'][]='EXT:pixe_feediting/class.tx_pixefeediting_getMainFields_preProcess.php:tx_pixefeediting_getMainFields_preProcess';
2) How I shold define class file and a function.

I don't understand what to set as the name of the function.

I would need to add something like


....
  function ???(???) {
if((t3lib_extMgm::isLoaded('direct_mail_subscrition')  || 
t3lib_extMgm::isLoaded('df_direct_mail_subscrition')) 
t3lib_div::_GP('cmd')=='setfixed'  && t3lib_div::_GP('sFK')=='DELETE')
		 
$GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_dmail_ttaddress_category_mm','uid_local='.intval(t3lib_div::_GP('rU')));
}
		
	




More information about the TYPO3-dev mailing list