4 |
## $Id$ |
## $Id$ |
5 |
## ----------------------------------------------------------------------------- |
## ----------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.6 2003/04/10 06:19:33 joko |
8 |
|
## minor fix: prevent use of undefined instance |
9 |
|
## |
10 |
|
## Revision 1.5 2003/04/07 22:29:27 jonen |
11 |
|
## + minor changes |
12 |
|
## |
13 |
## Revision 1.4 2003/04/05 21:17:51 joko |
## Revision 1.4 2003/04/05 21:17:51 joko |
14 |
## extends Class::Abstract (for being able to call '_abstract_method' on it) |
## extends Class::Abstract (for being able to call '_abstract_method' on it) |
15 |
## |
## |
68 |
function WebExplorer_Module_AbstractGUIModule($args = array()) { |
function WebExplorer_Module_AbstractGUIModule($args = array()) { |
69 |
$this->_args = $args; |
$this->_args = $args; |
70 |
|
|
|
$this->set_gui_object(); |
|
71 |
//print Dumper($this->_gui_object); |
//print Dumper($this->_gui_object); |
72 |
|
$this->set_gui_object(); |
73 |
} |
} |
74 |
|
|
75 |
|
|
76 |
function set_gui_object() { |
function set_gui_object() { |
77 |
user_error("AbstractGUIModule::set_gui_object() - Child must override"); |
$msg = "AbstractGUIModule::get_gui_object() - Child must override"; |
78 |
|
user_error($msg); |
79 |
|
return $msg; |
80 |
} |
} |
81 |
|
|
82 |
|
|
83 |
function add_hidden_items($items) { |
function add_hidden_items($items) { |
84 |
foreach($items as $label => $value) { |
foreach($items as $label => $value) { |
85 |
$this->add_hidden_item($label, $value); |
$this->add_hidden_element($label, $value); |
86 |
} |
} |
87 |
} |
} |
88 |
|
|
89 |
|
|
90 |
function add_hidden_item($label, $value) { |
function add_hidden_element($label, $value) { |
91 |
|
// TODO: review this! |
92 |
|
if (!$this->_gui_object) { return; } |
93 |
//print "Label: $label => $value<br>"; |
//print "Label: $label => $value<br>"; |
94 |
$this->_gui_object->add_hidden_element($label, $value); |
$this->_gui_object->add_hidden_element($label, $value); |
95 |
} |
} |
96 |
|
|
97 |
|
|
98 |
function &get() { |
function &get() { |
99 |
if($this->_args['adapter']) { |
if($this->_args['adapter']) { |
100 |
return $this->mungle_adapter($this->_args['adapter']); |
return $this->mungle_adapter($this->_args['adapter']); |
107 |
return php::mkInstance($label, array(&$this->_gui_object)); |
return php::mkInstance($label, array(&$this->_gui_object)); |
108 |
} |
} |
109 |
|
|
110 |
|
|
111 |
} |
} |
112 |
|
|
113 |
?> |
?> |