[TYPO3] writing a hook for starttime and endtime

Tapio Markula tapio.markula at atwebteam.com
Sun Apr 22 10:26:54 CEST 2007

Praveen Chakravadhanula

> by problem is how to include this code into the given hook. i have never
> done it before and having problems in writing to the class.

Well hook concept was also difficult for me.

Here my hook
if (is_array 
as $classRef) {
$hookObj= &t3lib_div::getUserObj($classRef);				if 
(method_exists($hookObj, 'addMiscellaneousItems'))
					$editMenu .= 

The most important issue is the name of the needed function,
in this case 'addMiscellaneousItems'. Typo3 should find the mentioned 
function (class method). If that class method has been found, the hook 

How typo3 can find the class method

Do these

1. Create a new extension
2. put into ext_localconf.php

  identification for typoe
2.2 [] = new item
2.3 EXT:tm_contentaccess/class.tx_ux_tm_contentaccess.php = file, where 
the hook function
2.4 EXT:tm_contentaccess/...:tx_ux_tm_contentaccess = class, where the 
hook function exist
2.5 'addMiscellaneousItems' = the name of the hook function, which 
should be insided the previous mentioned class file

3) Create class file - below is an example 

class tx_ux_tm_contentaccess {
	function addMiscellaneousItems($foo='',$goo='') {		
		$content='<li><a hfer="#" onclick="return false">some link here</a></li>';
	return $content;

'$hookObj->addMiscellaneousItems' match with  'function 

More information about the TYPO3-english mailing list