619daeabca796e743e9b2285f04926993333d82a
1 <?php
3 class goCupsServer extends goService{
5 var $cli_summary = "This plugin is used within the ServerService Pluign \nand indicates that this server supports cups management.";
6 var $cli_description = "Some longer text\nfor help";
7 var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
9 /* This plugin only writes its objectClass */
10 var $objectclasses = array("goCupsServer");
11 var $attributes = array();
12 var $StatusFlag = "goCupsServerStatus";
14 /* This class can't be assigned twice so it conflicts with itsself */
15 var $conflicts = array("goCupsServer");
17 var $DisplayName = "";
18 var $dn = NULL;
19 var $acl;
20 var $cn = "";
21 var $goCupsServerStatus = "";
22 var $view_logged =FALSE;
24 function goCupsServer(&$config,$dn)
25 {
26 goService::goService($config,$dn);
27 $this->DisplayName = _("Print service");
28 }
31 function execute()
32 {
33 if($this->is_account && !$this->view_logged){
34 $this->view_logged = TRUE;
35 new log("view","server/".get_class($this),$this->dn);
36 }
38 $smarty = get_smarty();
39 foreach($this->attributes as $attr){
40 $smarty->assign($attr,$this->$attr);
41 }
42 return($smarty->fetch(get_template_path("goCupsServer.tpl",TRUE,dirname(__FILE__))));
43 }
45 function getListEntry()
46 {
47 $fields = goService::getListEntry();
48 $fields['Message'] = _("Print service");
49 #$fields['AllowEdit'] = false;
50 return($fields);
51 }
53 function check()
54 {
55 $message = plugin::check();
56 return($message);
57 }
59 function save_object()
60 {
61 plugin::save_object();
62 }
64 /* Return plugin informations for acl handling */
65 static function plInfo()
66 {
67 return (array(
68 "plShortName" => _("Cups"),
69 "plDescription" => _("Print service")." ("._("Services").")",
70 "plSelfModify" => FALSE,
71 "plDepends" => array(),
72 "plPriority" => 100,
73 "plSection" => array("administration"),
74 "plCategory" => array("server"),
75 "plRequirements"=> array('ldapSchema' => array('goCupsServer' => '>=2.7')),
77 "plProvidedAcls"=> array(
78 "start" => _("Start"),
79 "stop" => _("Stop"),
80 "restart" => _("Restart"),
81 )
82 ));
83 }
84 }
85 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
86 ?>