[TYPO3] Building a hook
tapio
tapio.markula at dnainternet.net
Thu Mar 9 16:02:58 CET 2006
Hi
I have read instructions concerning buildin hooks but I don't fully
understand them.
Does the following code seems to be reasonable
if($hasAccess==1)
{
$_procObj = array();
if(is_array($TYPO3_CONF_VARS['EXTCONF']['tm_contentaccess']['hasAccess']))
{
foreach
($TYPO3_CONF_VARS['EXTCONF']['tm_contentaccess']['hasAccess'] as
$hasAccessControl) {
$_procObj = &t3lib_div::getUserObj($hasAccessControl);
if($_procObj==0)
$hasAccess=0;
}
}
}
The idea is that inside a hook file could give some condition, which
could return true or false. If false, it would set $hasAccess as '0' if
it was before '1'.
In the ext_localconf.php
$GLOBALS
['TYPO3_CONF_VARS']['EXTCONF']['tm_contentaccess']['hasAccess'][] =
'EXT:tm_contentaccess/class.tx_tm_contentaccess.php:tx_tm_contentaccess';
I made a plugin, which list groups, which can access
a content element.
I don't fully understand values, which kicstarter lists for form types.
I would use list for be-groups the same type as has now used for
fe-groups but I don't know which is the correct type
I put
"type" => "group",
But it might be incorrect.
If the list is empty it would be skipped.
If the user doesn't belong to a listed group, hasaccess would be turned
to false. Does this sound reasonable?
But what the hook file should have to do that check?
This hook has been requested from me and that's why I would like to
build it.
More information about the TYPO3-english
mailing list