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