Hab es nun über einen Hook in der Klasse localRecordList gelöst.
Man erstellt eine eigene Klasse und implementiert localRecordList_actionHook. Das Interface stellt 4 Funktionsaufrufe zur Verfügung, mit der man Einfluss auf das Erstellen der Icons in der Listenansicht des Backends nehmen kann. Dies sind:
- makeClip($table, $row, $cells, &$parentObject)
- makeControl($table, $row, $cells, &$parentObject)
- renderListHeader($table, $currentIdList, $headerColumns, &$parentObject)
- renderListHeaderActions($table, $currentIdList, $cells, &$parentObject)
Die Klasse localRecordList findet man in typo3/class.db_list_extra.inc
Das Interface liegt unter typo3/interfaces/interface.localrecordlist_actionsHook.php
Um nun verschiedene Icons in der Listenansicht für bestimmte Backend-Benutzergruppen zu verstecken, habe ich im TS eigene Parameter eingefügt. Damit kann ich für Datensätze einer oder mehrerer Tabellen, die Icons beeinflussen:
mod.web_list {
noCreateRecordsLink=1
// my parameters
// options to hide the cut, copy and delete icons from list view
disableCutCopyOnTables = tx_meineExt_Tabelle1 disableDeleteOnTables = tx_meineExt_Tabelle1 disableHistoryOnTables = tx_meineExt_Tabelle1, tx_meineExt_Tabelle2
disableVersionOnTables = tx_meineExt_Tabelle1, tx_meineExt_Tabelle2
noCreateRecordsLink=1
}
In meiner Klasse hab ich dann die Funktionen makeClip und makeControl angepasst:
public function makeControl($table, $row, $cells, &$parentObject) {
if (isset($GLOBALS['SOBE']->modTSconfig['properties']['disableCutCopyOnTables'])) {
if(t3lib_div::inList($GLOBALS['SOBE']->modTSconfig['properties']['disableDeleteOnTables'], $table)) {
$cells['delete'] = $parentObject->spaceIcon;
}
if(t3lib_div::inList($GLOBALS['SOBE']->modTSconfig['properties']['disableHistoryOnTables'], $table)) {
unset($cells['history']);
}
if(t3lib_div::inList($GLOBALS['SOBE']->modTSconfig['properties']['disableVersionOnTables'], $table)) {
unset($cells['version']);
}
}
return $cells;
}
Hoffe es hilf jemanden weiter...
VG, Dirk