Skip to content

Instantly share code, notes, and snippets.

@intco
Last active August 29, 2015 13:57
Show Gist options
  • Save intco/9805578 to your computer and use it in GitHub Desktop.
Save intco/9805578 to your computer and use it in GitHub Desktop.
GSA2 - tl_gsa_structure.php
<?php
# tl_gsa_structure.php
$GLOBALS['TL_DCA']['tl_gsa_structure']['config']['onload_callback'][] = array('tl_gsa_structure_zzzcustom', 'fixPalette');
class tl_gsa_structure_zzzcustom extends Backend {
public function fixPalette($dc) {
$this->import('BackendUser', 'User');
// se l'utente è un amministratore lascia le funzioni invariate
if ($this->User->isAdmin) {
return;
}
// decommentare le funzioni da rimuovere
//unset($GLOBALS['TL_DCA']['tl_gsa_structure']['list']['operations']['gsa_gallery']); // gallery
//unset($GLOBALS['TL_DCA']['tl_gsa_structure']['list']['operations']['gest-elementi-listino']); // elementi listino
//unset($GLOBALS['TL_DCA']['tl_gsa_structure']['list']['operations']['gest-listino']); // note listino
//unset($GLOBALS['TL_DCA']['tl_gsa_structure']['list']['operations']['gest-servizi-struttura']); // servizi
//unset($GLOBALS['TL_DCA']['tl_gsa_structure']['list']['operations']['gsa_offer']); // offerte
//unset($GLOBALS['TL_DCA']['tl_gsa_structure']['list']['operations']['gsa_lastminute']); // last minute
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment