d686439c19832711746d834c7640ec277db9fbcc
1 <?php
3 class TemplateWidget
4 {
5 protected $name = "unnamed";
6 protected $value = "";
8 protected $description = "";
9 protected $required = "";
10 protected $type = "";
11 protected $display = "";
13 function __construct(&$config, $name, $value, $description,$required,$type,$display)
14 {
15 $this->config = &$config;
16 $this->name = $name;
17 $this->value = $value;
18 $this->description = $description;
19 $this->required = $required;
20 $this->type = $type;
21 $this->display = $display;
22 $class = get_class();
23 $this->postName = "{$class}_{$this->name}";
24 }
26 function getDisplayName()
27 {
28 return($this->display);
29 }
32 function render()
33 {
34 return("");
35 }
37 function save_object()
38 {
39 if(isset($_POST[$this->postName])){
40 $this->value = get_post($this->postName);
41 }
42 }
44 function getValue()
45 {
46 return($this->value);
47 }
49 function getName()
50 {
51 return($this->name);
52 }
54 function setValue($value)
55 {
56 $this->value = $value;
57 }
59 }
61 ?>