Code

Added action install
[gosa.git] / gosa-plugins / opsi / admin / opsi / class_opsi_product_config.inc
1 <?php
3 class opsi_product_config extends plugin
4 {
5   private $product;
6   private $cfg;
7   private $hostId;
9   public function __construct($config,$product,$cfg = array() ,$hostId = "")
10   {
11     $this->config  = $config;
12     $this->product = $product;
13     $this->cfg     = $cfg;
14     $this->hostId  = $hostId;
15   }
17   public function execute()
18   {
19     $smarty = get_smarty();
20     $smarty->assign("cfg",$this->cfg);
21     return($smarty->fetch(get_template_path("properties.tpl",TRUE,dirname(__FILE__))));
22   }
24   public function save_object()
25   {
26     foreach($this->cfg as $name => $value){
27       if(isset($_POST['value_'.$name])){
28         $this->cfg[$name] = validate(get_post('value_'.$name));
29       }
30     }
31   }
33   public function get_cfg() 
34   {
35     return($this->cfg);
36   }
38   public function get_product()
39   {
40     return($this->product);
41   }
43   public function get_hostId()
44   {
45     return($this->hostId);
46   }
47 }
53 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
54 ?>