Code

Updated colsize
[gosa.git] / gosa-core / plugins / generic / dashBoard / class_dashBoard.inc
1 <?php
3 class dashBoard extends plugin
4 {
5     var $plHeadline = 'Dash board';
6     var $plDescription = 'Dash board';
7     var $plShortIcon = 'dashBoard.png';
8     var $plIcon = 'plugin.png';
10     private $dbPluginStatus = NULL;
11     private $dbChannelStatus = NULL;
12     private $dbNotifications = NULL;
13     private $dbInformation = NULL;
15     function __construct($config)
16     {
17         plugin::plugin($config, NULL);
19         // Instantiate child classes
20         $this->dbPluginStatus = new dbPluginStatus($config);
21         $this->dbChannelStatus = new dbChannelStatus($config);
22         $this->dbNotifications = new dbNotifications($config);
23         $this->dbInformation = new dbInformation($config);
26         // Detect registration status 
27         $this->GOsaRegistration = new GOsaRegistration($config);
28         $this->registered = GOsaRegistration::isRegistered($config);
29     }
31     function execute()
32     {
34         if(!$this->registered){
35             return($this->GOsaRegistration->execute());
36         }
38         $smarty = get_smarty();
39         $smarty->assign('dbPluginStatus', $this->dbPluginStatus->execute());
40         $smarty->assign('dbChannelStatus', $this->dbChannelStatus->execute());
41         $smarty->assign('dbNotifications', $this->dbNotifications->execute());
42         $smarty->assign('dbInformation', $this->dbInformation->execute());
43         return($smarty->fetch(get_template_path('dashBoard.tpl', TRUE)));
44     }
46     function check()
47     {
48         $messages = plugin::check();
49         $messages = array_merge($this->dbPluginStatus->check());    
50         $messages = array_merge($this->dbChannelStatus->check());    
51         $messages = array_merge($this->dbNotifications->check());    
52         $messages = array_merge($this->dbInformation->check());    
53         return($messages);
54     }
56     function save_object()
57     {
58         plugin::save_object();
59         $this->dbPluginStatus->save_object();
60         $this->dbChannelStatus->save_object();
61         $this->dbNotifications->save_object();
62         $this->dbInformation->save_object();
63     }
65     function save()
66     {
67         plugin::save();
68         $this->dbPluginStatus->save();
69         $this->dbChannelStatus->save();
70         $this->dbNotifications->save();
71         $this->dbInformation->save();
72     }
74     function remove_from_parent()
75     {
76         plugin::remove_from_parent();
77         $this->dbPluginStatus->remove_from_parent();
78         $this->dbChannelStatus->remove_from_parent();
79         $this->dbNotifications->remove_from_parent();
80         $this->dbInformation->remove_from_parent();
81     }
82 }
84 ?>