function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->server_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
     $this->setActions(array('index', 'edit', 'save', 'delete', 'view'), 'index');
     // make sure only admins are allowed to edit/delete servers:
     $this->setMinUserLevelRequiredForAction(PSM_USER_ADMIN, array('delete', 'edit', 'save'));
     $this->twig->addGlobal('subtitle', psm_get_lang('menu', 'server'));
 }
 function __construct(Database $db, \Twig_Environment $twig)
 {
     parent::__construct($db, $twig);
     $this->setActions(array('index', 'saveLayout'), 'index');
 }