[Typo3-dev] Error in how-to-use-existing-hooks article

Michael Perkhofer michael.perkhofer at uibk.ac.at
Sat Apr 2 16:02:38 CEST 2005


Hi!

I tried to create a hook for my extensions and read through all the great documents, that are available on that topic.
I found a confusing (possible - maybe I got something wrong..) litte error on
http://typo3.org/development/articles/how-to-use-existing-hooks/page/8/ at 'Hint:'

I guess
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemainprocdm.php']['processDatamapClass'][] = 'EXT:myextension/class.myextension_tcemainprocdm.php:tx_myextension_tcemainprocdm';

should be

$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:myextension/class.myextension_tcemainprocdm.php:tx_myextension_tcemainprocdm';

Additionally, it should be pointed out, what can be found in class.t3lib_div.php's getUserObj methode:

"Class reference, '[file-reference":"]["&"]class-name'. You can prefix the class name with "[file-reference]:" and t3lib_div::getFileAbsFileName() will then be used to resolve the filename and 
subsequently include it by "require_once()" which means you don't have to worry about including the class file either! Example: "EXT:realurl/class.tx_realurl.php:&tx_realurl". Finally; for the class 
name you can prefix it with "&" and you will reuse the previous instance of the object identified by the full reference string (meaning; if you ask for the same $classRef later in another place in the 
code you will get a reference to the first created one!)."

But of course THANKS to Robert for that article!!

-Michael.




More information about the TYPO3-dev mailing list