/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/AbstractGUIModule.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/AbstractGUIModule.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by joko, Wed Apr 16 16:15:27 2003 UTC revision 1.8 by jonen, Fri Apr 18 13:31:48 2003 UTC
# Line 4  Line 4 
4  ##    $Id$  ##    $Id$
5  ##    -----------------------------------------------------------------------------  ##    -----------------------------------------------------------------------------
6  ##    $Log$  ##    $Log$
7    ##    Revision 1.8  2003/04/18 13:31:48  jonen
8    ##    + Now hidden elements could be given to the constructor as $args['hidden_elements'],
9    ##       which is needed special for not-real object instancation in inhiterated child objects
10    ##       (e.g. AbstractNavigationList, etc.)
11    ##    + For real object instances at inhiterated objects
12    ##       an api function 'add_hidden_element' could be used after this object is instanced
13    ##      (e.g DataList, DataItem, etc.).
14    ##
15  ##    Revision 1.7  2003/04/16 16:15:27  joko  ##    Revision 1.7  2003/04/16 16:15:27  joko
16  ##    behavior fix to 'function add_hidden_element': just calling 'add_hidden_element' on core instance of it provides this method  ##    behavior fix to 'function add_hidden_element': just calling 'add_hidden_element' on core instance of it provides this method
17  ##  ##
# Line 62  class WebExplorer_Module_AbstractGUIModu Line 70  class WebExplorer_Module_AbstractGUIModu
70    * variable thats holds the reference to phphtmllib GUI object    * variable thats holds the reference to phphtmllib GUI object
71    */    */
72   var $_gui_object;   var $_gui_object;
73    
74   /**   /**
75    *  the contructor    *  the contructor
76      * hidden elements could be given to the constructor as $args['hidden_elements'],
77      * which is needed special for not-real object instancation in inhiterated child objects
78      * (e.g. AbstractNavigationList, etc.)
79    *    *
80    * @params struct - the arguments    * @params struct - the arguments
81    */    */
82    function WebExplorer_Module_AbstractGUIModule($args = array()) {    function WebExplorer_Module_AbstractGUIModule($args = array()) {
83      $this->_args = $args;      $this->_args = $args;
84                    
85      //print Dumper($this->_gui_object);      //print Dumper($this->_gui_object);
86      $this->set_gui_object();      $this->set_gui_object();
87    }    }
# Line 82  class WebExplorer_Module_AbstractGUIModu Line 93  class WebExplorer_Module_AbstractGUIModu
93                  return $msg;                  return $msg;
94    }    }
95        
96     /**
97    function add_hidden_items($items) {    * Api function to add hidden elements instead or in addtion to
98      foreach($items as $label => $value) {    * at constructor given hidden elements.
99        $this->add_hidden_element($label, $value);    * Note: All hidden elements *must* be loaded *before* $this->get()
100      }    *         is initiated!
101      *
102      */
103      function add_hidden_element($label, $value) {
104          $this->_args['hidden_elements'][$label] = $value;
105    }    }
106    
107        
108    function add_hidden_element($label, $value) {    function _add_hidden_element($label, $value) {
109      // TODO: review this!      // TODO: review this!
110      if (!$this->_gui_object) { return; }      if (!$this->_gui_object) { return; }
111      //print "Label: $label => $value<br>";      //print "Label: $label => $value<br>";
# Line 103  class WebExplorer_Module_AbstractGUIModu Line 118  class WebExplorer_Module_AbstractGUIModu
118    
119    
120    function &get() {    function &get() {
121        if(is_array($this->_args['hidden_elements'])) {
122          foreach($this->_args['hidden_elements'] as $label => $value) {
123            $this->_add_hidden_element($label, $value);
124          }
125        }
126    
127      if($this->_args['adapter']) {      if($this->_args['adapter']) {
128        return $this->mungle_adapter($this->_args['adapter']);        return $this->mungle_adapter($this->_args['adapter']);
129      } else {      } else {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed