4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.5 2003/04/07 22:29:27 jonen |
8 |
|
## + minor changes |
9 |
|
## |
10 |
## Revision 1.4 2003/04/05 21:17:51 joko |
## Revision 1.4 2003/04/05 21:17:51 joko |
11 |
## extends Class::Abstract (for being able to call '_abstract_method' on it) |
## extends Class::Abstract (for being able to call '_abstract_method' on it) |
12 |
## |
## |
65 |
function WebExplorer_Module_AbstractGUIModule($args = array()) { |
function WebExplorer_Module_AbstractGUIModule($args = array()) { |
66 |
$this->_args = $args; |
$this->_args = $args; |
67 |
|
|
|
$this->set_gui_object(); |
|
68 |
//print Dumper($this->_gui_object); |
//print Dumper($this->_gui_object); |
69 |
|
$this->set_gui_object(); |
70 |
} |
} |
71 |
|
|
72 |
|
|
73 |
function set_gui_object() { |
function set_gui_object() { |
74 |
user_error("AbstractGUIModule::set_gui_object() - Child must override"); |
$msg = "AbstractGUIModule::get_gui_object() - Child must override"; |
75 |
|
user_error($msg); |
76 |
|
return $msg; |
77 |
} |
} |
78 |
|
|
79 |
|
|
80 |
function add_hidden_items($items) { |
function add_hidden_items($items) { |
81 |
foreach($items as $label => $value) { |
foreach($items as $label => $value) { |
82 |
$this->add_hidden_item($label, $value); |
$this->add_hidden_element($label, $value); |
83 |
} |
} |
84 |
} |
} |
85 |
|
|
86 |
|
|
87 |
function add_hidden_item($label, $value) { |
function add_hidden_element($label, $value) { |
88 |
//print "Label: $label => $value<br>"; |
//print "Label: $label => $value<br>"; |
89 |
$this->_gui_object->add_hidden_element($label, $value); |
$this->_gui_object->add_hidden_element($label, $value); |
90 |
} |
} |
91 |
|
|
92 |
|
|
93 |
function &get() { |
function &get() { |
94 |
if($this->_args['adapter']) { |
if($this->_args['adapter']) { |
95 |
return $this->mungle_adapter($this->_args['adapter']); |
return $this->mungle_adapter($this->_args['adapter']); |
102 |
return php::mkInstance($label, array(&$this->_gui_object)); |
return php::mkInstance($label, array(&$this->_gui_object)); |
103 |
} |
} |
104 |
|
|
105 |
|
|
106 |
} |
} |
107 |
|
|
108 |
?> |
?> |