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

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

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

revision 1.8 by jonen, Fri Apr 18 13:33:44 2003 UTC revision 1.11 by joko, Tue May 13 14:58:35 2003 UTC
# Line 1  Line 1 
1  <?  <?
2  /*  /**
3  ##    -----------------------------------------------------------------------------   * This file contains the WebExplorer_Module_NavigationList child class,
4  ##    $Id$   * it inherits from the WebExplorer_Module_AbstractNavigationList.
5  ##    -----------------------------------------------------------------------------   *
6  ##    $Log$   * @author Sebastian Utz <seut@tunemedia.de>
7  ##    Revision 1.8  2003/04/18 13:33:44  jonen   * @package org.netfrag.app
8  ##    CHANGE: link_vars now are passed by contructor arguments   * @name WebExplorer::Module::NavigationList
9  ##      (so that the AbstractExplorer could handle these...)   *
10  ##   */
11  ##    Revision 1.7  2003/04/16 16:13:04  joko  
12  ##    updates to 'function propagate': + minor cosmetic update, ++ special mode: 'tree' if value of node ends with '.xml'  /**
13  ##   * Cvs-Log:
14  ##    Revision 1.6  2003/04/08 22:40:06  joko   *
15  ##    renamed / revamped shortcut to LinkBuilder (now via url::short)   * $Id$
16  ##   *
17  ##    Revision 1.5  2003/04/06 04:26:43  joko   * $Log$
18  ##    shortcut for LinkBuilder   * Revision 1.11  2003/05/13 14:58:35  joko
19  ##   * reset filter when clicking navigational items
20  ##    Revision 1.4  2003/04/06 01:44:52  jonen   *
21  ##    + build links now with help of LinkBuilder class   * Revision 1.10  2003/04/18 15:12:33  joko
22  ##      (one id instead of a bunch of variables... ;)   * modified header to be phpDocumentor compliant
23  ##   *
24  ##    Revision 1.3  2003/04/05 21:17:16  joko   * Revision 1.9  2003/04/18 14:40:57  jonen
25  ##    moved code to AbstractNavigationList.php   * bugfix
26  ##   *
27  ##   * Revision 1.8  2003/04/18 13:33:44  jonen
28  ##    -----------------------------------------------------------------------------   * CHANGE: link_vars now are passed by contructor arguments
29  */   *   (so that the AbstractExplorer could handle these...)
30     *
31     * Revision 1.7  2003/04/16 16:13:04  joko
32     * updates to 'function propagate': + minor cosmetic update, ++ special mode: 'tree' if value of node ends with '.xml'
33     *
34     * Revision 1.6  2003/04/08 22:40:06  joko
35     * renamed / revamped shortcut to LinkBuilder (now via url::short)
36     *
37     * Revision 1.5  2003/04/06 04:26:43  joko
38     * shortcut for LinkBuilder
39     *
40     * Revision 1.4  2003/04/06 01:44:52  jonen
41     * + build links now with help of LinkBuilder class
42     *   (one id instead of a bunch of variables... ;)
43     *
44     * Revision 1.3  2003/04/05 21:17:16  joko
45     * moved code to AbstractNavigationList.php
46     *
47     */
48    
49    /**
50     * This requires the WebExplorer::Module::AbstractNavigationList
51     * component as base class.
52     *
53     */
54  loadModule('WebExplorer::Module::AbstractNavigationList');  loadModule('WebExplorer::Module::AbstractNavigationList');
55    
56    /**
57     * The WebExplorer_Module_NavigationList child class queries the
58     * backend for a list of known nodes at toplevel.
59     *
60     * It's using the DataSource::Generic chain to access the common
61     * backend datasource query API (queryData/querySchema).
62     *
63     * The results - probably a simple list - are displayed inside
64     * a VerticalCSSNavTable by using the AbstractNavigationList.
65     *
66     * The links contain http query arguments which should trigger
67     * the request processor (MVC) to navigate into the selected
68     * top-level node.
69     * This displays a list of second level nodes inside the content area
70     * which are most probably full blown row-based results.
71     * (ms-lingo: recordsets)
72     *
73     *
74     * @link http://www.netfrag.org/~jonen/
75     * @author Sebastian Utz <seut@tunemedia.de>
76     *
77     * @copyright (c) 2003 - All Rights reserved.
78     *
79     * @link http://www.gnu.org/licenses/lgpl.txt
80     * @license GNU LGPL (GNU Lesser General Public License)
81     *
82     *
83     * @package org.netfrag.app
84     * @subpackage WebExplorer
85     * @name WebExplorer::Module::NavigationList
86     *
87     *
88     */
89  class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractNavigationList {  class WebExplorer_Module_NavigationList extends WebExplorer_Module_AbstractNavigationList {
90    
91    function propagate() {    function propagate() {
92    
93      // default link arguments to branch to a list      //print Dumper($this);
94     //$link_vars = array(  
95     //   'ap' => "explorer",      // V1 - manually defined default link arguments to branch to a list
96     //   'ecl' => "content",      //$link_vars = array(
97     //   'ect' => "data",      //   'ap' => "explorer",
98     //   'ecdlk' => "rpc",      //   'ecl' => "content",
99     //   'ecat' => "list",      //   'ect' => "data",
100     // );      //   'ecdlk' => "rpc",
101          //   'ecat' => "list",
102     $link_vars = $this->_args['hidden_items'];      // );
103    
104        // V2 - required link arguments to stay in flow are now automagically propagated to our arguments
105        $link_vars = $this->_args['hidden_elements'];
106        
107        // V3 - TODO: enhanced version of this mechanism - make both things possible using ...
108        // $link_vars = php::array_join_merge($link_vars_default, $link_vars_passed_in);
109            
110      foreach ($this->result as $value) {      foreach ($this->result as $value) {
111        $alt_caption = "Alle Elemente unterhalb von '$value' anzeigen.";        $alt_caption = "Alle Elemente unterhalb von '$value' anzeigen.";
# Line 56  class WebExplorer_Module_NavigationList Line 118  class WebExplorer_Module_NavigationList
118    
119        // V3: use LinkBuilder to save vars at session and get unique id instead        // V3: use LinkBuilder to save vars at session and get unique id instead
120        $link_vars['ecdid'] = $value;        $link_vars['ecdid'] = $value;
121          
122          // reset data filter
123          $link_vars['ecdf'] = '';
124    
125          // FIXME: HACK???
126        // modify default link if name of linked node contains '.xml'        // modify default link if name of linked node contains '.xml'
127        if (stristr($value, '.xml')) {        if (stristr($value, '.xml')) {
128          $link_vars['ecat'] = 'tree';          $link_vars['ecat'] = 'tree';

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

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