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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations)
Fri Apr 18 15:12:33 2003 UTC (21 years, 5 months ago) by joko
Branch: MAIN
Changes since 1.9: +92 -38 lines
modified header to be phpDocumentor compliant

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

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