[TYPO3-core] RFC #13576, 13577, 13578: Add Hooks in order to restrict permissions for individual content elements

Benjamin Mack benni at typo3.org
Fri Feb 26 17:35:20 CET 2010


Hey Matthias,

nice to see you on this list :)

1. tcemain hook:

 > $hookObj = t3lib_div..

no need to return the $hookObj, this should suffice:

 > t3lib_div::callUserFunction($classRef, $delRec, $this);

2. clickmenu hook:

a) like above, no need to return $hookObj

b) please make an associative array out of the $_params, like this:

$_params = array(
	'uid' => $uid,
	'table' => $table,
	'disabledItems' => &$this->disabledItems
);

Also, I'm not sure if we need this. Can't we do this with the method 
"processingByExtClassArray()" ? You should be able to create your own 
Ext that has the clickmenu object as parameter, which you can modify the 
disabledItems patch with. Right?

So, you could probably solve this issue with another way than adding a 
hook in alt_clickmenu.php.

3. alt_doc hook.

a) like above, $hookObj

b) I don't think the hook should be in this place. I think it should 
rather be in the preInit() method in the very end. You could then send 
the alt_doc object as parameter and modify its  $this->editconf to 
remove the items that are not allowed to be edited. That should suffice 
as well, right?


All the best,
Benni.


More information about the TYPO3-team-core mailing list