[TYPO3-dev] Hook problem

Tapio Markula tapio.markula at atwebteam.com
Thu May 3 10:09:24 CEST 2007


Hi

I don't understand how to use this kind of hook

$this->hookObjectsMainFields = array();
         if (is_array 
($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'])) 
{
             foreach 
($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'] 
as $classRef)    {
                 $this->hookObjectsMainFields[] = 
&t3lib_div::getUserObj($classRef);
             }
         }

...

and in another function

     // Hook: getMainFields_preProcess (requested by Thomas Hempel for 
use with the "dynaflex" extension)
         foreach ($this->hookObjectsMainFields as $hookObj)    {
             if (method_exists($hookObj,'getMainFields_preProcess'))    {
                 $hookObj->getMainFields_preProcess($table,$row,$this);
             }
         }

in
class.t3lib_tceforms.php


I have used hooks like
$TYPO3_CONF_VARS['EXTCONF'][TM_CONTENTACCESS_EXTkey]['recordAccess'][]='EXT:tm_contentaccess/class.tx_ux_tm_contentaccess.php:tx_ux_tm_contentaccess';


How to define key definition for
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass']


$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'][]='EXT:tm_contentaccess/class.getMainFields_preProcess.php:getMainFields_preProcess';
+

class getMainFields_preProcess {
	
	function getMainFields_preProcess(&$table,&$row,&$this) {
		global $TCA;
		t3lib_div::debug($table);

doesn't do anything because t3lib_div::debug($table); doesn't do 
anything. Function has not been used and I don't understand why not.




More information about the TYPO3-dev mailing list