[TYPO3] Building a hook

tapio tapio.markula at dnainternet.net
Fri Mar 10 16:34:41 CET 2006


Bernhard Kraft wrote:
> tapio wrote:
> 
>>                                                     $_procObj =
>>&t3lib_div::getUserObj($hasAccessControl);
> 
> 
> And this just returns you an object. You also have to call a method out
> of it with:
> 
> $hasAccess = $_procObj->method();

But I can't know that method someone else might use.
I thought that the method comes from
foreach ($TYPO3_CONF_VARS['EXTCONF']['tm_contentaccess']['hasAccess'] as 
$hasAccessControl)

> Else you would get "no access" when no hook is installed.

I didn't get "no access" when no hook is installed.
Maybe I must remove the trial of creating a hook.
If
if($hasAccess)
											{
											$_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)
													 	$hasAccess=0;
													}
												}
											}
then I don't really understand any of the explanations,
which concerns hooks.
I didn't understand you your answer either.



More information about the TYPO3-english mailing list