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

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

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

revision 1.1 by joko, Sat Apr 5 20:34:03 2003 UTC revision 1.3 by joko, Fri Apr 18 15:11:56 2003 UTC
# Line 1  Line 1 
1  <?  <?
2  /*  /**
3  ##    -----------------------------------------------------------------------------   * This file contains the WebExplorer_Module_AbstractNavigationList child class,
4  ##    $Id$   * it inherits from the WebExplorer_Module_AbstractGUIModule.
5  ##    -----------------------------------------------------------------------------   *
6  ##    $Log$   * @author Sebastian Utz <seut@tunemedia.de>
7  ##    Revision 1.1  2003/04/05 20:34:03  joko   * @package org.netfrag.app
8  ##    code from NavigationList.php   * @name WebExplorer::Module::AbstractNavigationList
9  ##   *
10  ##    Revision 1.2  2003/03/28 03:06:48  joko   */
11  ##    enhanced: now aware of "No data."  
12  ##  /**
13  ##    Revision 1.1  2003/03/27 01:26:18  jonen   * Cvs-Log:
14  ##    + initial commit, example of a simple NavigationList   *
15  ##   * $Id$
16  ##    Revision 1.1  2003/03/01 22:57:23  cvsmax   *
17  ##    + inital commit   * $Log$
18  ##   * Revision 1.3  2003/04/18 15:11:56  joko
19  ##   * added pre-flight checks, modified header to be phpDocumentor compliant
20  ##    -----------------------------------------------------------------------------   *
21  */   *
22     * Revision 1.2  2003/04/08 17:58:28  joko
23     * minor fix: new shortcut(s) to LinkMaker
24     *
25     * Revision 1.1  2003/04/05 20:34:03  joko
26     * code from NavigationList.php
27     *
28     * Revision 1.2  2003/03/28 03:06:48  joko
29     * enhanced: now aware of "No data."
30     *
31     * Revision 1.1  2003/03/27 01:26:18  jonen
32     * + initial commit, example of a simple NavigationList
33     *
34     * Revision 1.1  2003/03/01 22:57:23  cvsmax
35     * + inital commit
36     *
37     */
38    
39    /**
40     * This requires the WebExplorer::Module::AbstractGUIModule
41     * component as base class.
42     *
43     */
44  loadModule('WebExplorer::Module::AbstractGUIModule');  loadModule('WebExplorer::Module::AbstractGUIModule');
45    
46    /**
47     * The abstract WebExplorer_Module_AbstractNavigationList class
48     * includes the base/common/generic infrastructure to display
49     * a table of navigation links which point to arbitrary other items.
50     *
51     * The structure making up the navigation table is loaded from
52     * an arbitrary data source. It contains information about labels
53     * urls, alt-texts and such.
54     *
55     * It handles the actual querying of data sources for child classes
56     * inheriting from it.
57     *
58     * It's using the DataSource::Generic chain to access the common
59     * backend datasource query API (queryData/querySchema).
60     *
61     * Metadata about the data source access is bundled inside a
62     * helper object called Data::Locator.
63     *
64     * The results - probably a simple list - are displayed inside
65     * a VerticalCSSNavTable. For being able to handle arbitrary
66     * results here, the 'propagate' method has to be overwritten.
67     *
68     * The links contain http query arguments which should trigger
69     * the request processor (MVC) to navigate into the selected
70     * top-level node.
71     * This displays a list of second level nodes inside the content area
72     * which are most probably full blown row-based results.
73     * (ms-lingo: recordsets)
74     *
75     *
76     * @link http://www.netfrag.org/~jonen/
77     * @author Sebastian Utz <seut@tunemedia.de>
78     *
79     * @copyright (c) 2003 - All Rights reserved.
80     *
81     * @link http://www.gnu.org/licenses/lgpl.txt
82     * @license GNU LGPL (GNU Lesser General Public License)
83     *
84     *
85     * @package org.netfrag.app
86     * @subpackage WebExplorer
87     * @name WebExplorer::Module::AbstractNavigationList
88     *
89     *
90     */
91  class WebExplorer_Module_AbstractNavigationList extends WebExplorer_Module_AbstractGUIModule {  class WebExplorer_Module_AbstractNavigationList extends WebExplorer_Module_AbstractGUIModule {
92    
93    var $source;    var $source;
# Line 35  class WebExplorer_Module_AbstractNavigat Line 101  class WebExplorer_Module_AbstractNavigat
101        
102    function buildNavList() {    function buildNavList() {
103    
104        $data_locator_meta = $this->_args['options']['data_locator_meta'];
105        
106        // NEW [2003-04-18]: pre-flight checks
107        if (!$data_locator_meta || !is_array($data_locator_meta) || !sizeof($data_locator_meta)) {
108          user_error(get_class($this) . ' [isa AbstractNavigationList]: Locator error. [caption=' . $this->_args[caption] . ']');
109          return;
110        }
111    
112      // query data      // query data
113        $initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );        $initial_locator = php::mkComponent( 'DataSource::Locator', array( adapter_type => 'phpHtmlLib' ) );
114        $proxy = php::mkComponent('DataSource::Generic', $initial_locator, $this->_args['options']['data_locator_meta']);        $proxy = php::mkComponent('DataSource::Generic', $initial_locator, $data_locator_meta);
115        $this->source = $proxy->get_adapter();        $this->source = $proxy->get_adapter();
116          //print get_class($this->source);
117        $this->source->do_query();        $this->source->do_query();
118        
119        //return;
120    
121      // trace      // trace
122      //print Dumper($initial_locator);      //print Dumper($initial_locator);
# Line 62  class WebExplorer_Module_AbstractNavigat Line 139  class WebExplorer_Module_AbstractNavigat
139                
140        // both are valid! (at least - should be...)        // both are valid! (at least - should be...)
141        //$nav->add(pageLink('explorer'), "No data.");        //$nav->add(pageLink('explorer'), "No data.");
142        $this->nav->add(topicLink('DataBrowser'), "No data.");        $this->nav->add(link::topic('DataBrowser'), "No data.");
143            
144      }      }
145    
# Line 78  class WebExplorer_Module_AbstractNavigat Line 155  class WebExplorer_Module_AbstractNavigat
155  }  }
156    
157    
   
158  ?>  ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

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