[TYPO3-dev] I don't understand the documentation for creating hooks

Rico Moorman rico at buyways.nl
Wed Mar 8 08:53:30 CET 2006


I think a hook on the suggested place could be really helpful or maybe 
also inside the function recordEditAccessInternals()

Did you get already some response about it tapio?

tapio wrote:
> 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