[TYPO3-dev] I don't understand the documentation for creating hooks
tapio
tapio.markula at dnainternet.net
Fri Mar 3 21:13:21 CET 2006
Hi
Sometimes explations are really awfull:
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/view/3/4/
*TOO MUCH*
1 ...
2 ...
3 ...
Extremely difficult to catch what to do. Not a good instruction.
I have *VERY BIG DIFFICULTIES TO UNDERSTAND HOOK EXPLANATIONS*
I have seldom this kind of difficulties but this is really one of the
explanations, which I have have serious difficulties to understand,
what's the point.
}
Because I have extremely serious difficulties to understand the
explantions I ask for help creating hook here
/*
$TYPO3_CONF_VARS['EXTCONF'][ extension_key ][ sub_key ] = value
// Register our class at a hook in TCEmain:
$GLOBALS
['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][]
= 'EXT:templavoila/class.tx_templavoila_tcemain.php:tx_templavoila_tcemain';
$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);
}
*/
// Check internals regarding access:
if ($hasAccess) {
$hasAccess = $BE_USER->recordEditAccessInternals($table,
$calcPRec);
if($hasAccess==1)
{
/*********** I would like this to use a hook - starts **************/
if($BE_USER->user['admin']==0 && $calcPRec['editlock']==1)
$hasAccess=0;
/*********** I would like this to use a hook - ends **************/
}
$deniedAccessReason = $BE_USER->errorMsg;
}
More information about the TYPO3-dev
mailing list