Added $Id$ keywords, cleaned up comment tags
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_pagetree.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * generate a page-tree. OBS: remember $clause
29 *
30 * $Id$
31 * Revised for TYPO3 3.6 August/2003 by Kasper Skaarhoj
32 * Maintained by René Fritz
33 *
34 * @author Kasper Skaarhoj <kasper@typo3.com>
35 * @coauthor René Fritz <r.fritz@colorcube.de>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 78: class t3lib_pageTree extends t3lib_treeView
43 * 91: function init($clause='')
44 * 106: function expandNext($id)
45 * 117: function wrapIcon($icon,$row)
46 * 131: function PMicon($row,$a,$c,$nextCount,$exp)
47 *
48 * TOTAL FUNCTIONS: 4
49 * (This index is automatically created/updated by the extension "extdeveval")
50 *
51 */
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 require_once (PATH_t3lib."class.t3lib_treeview.php");
69
70 /**
71 * Class for generating a page tree.
72 *
73 * @author Kasper Skaarhoj <kasper@typo3.com>
74 * @coauthor René Fritz <r.fritz@colorcube.de>
75 * @package TYPO3
76 * @subpackage t3lib
77 */
78 class t3lib_pageTree extends t3lib_treeView{
79 var $makeHTML=1;
80
81 var $clause=' AND NOT deleted';
82 var $db;
83 var $fieldArray = Array('uid','title','doktype','php_tree_stop');
84 var $defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id';
85 var $setRecs = 0;
86
87 /**
88 * @param [type] $clause: ...
89 * @return [type] ...
90 */
91 function init($clause='') {
92 parent::init($clause);
93 if (t3lib_extMgm::isLoaded('cms')) {
94 $this->fieldArray=array_merge($this->fieldArray,array('hidden','starttime','endtime','fe_group','module','extendToSubpages'));
95 }
96 $this->table='pages';
97 $this->treeName='pages';
98 }
99
100 /**
101 * [Describe function...]
102 *
103 * @param [type] $id: ...
104 * @return [type] ...
105 */
106 function expandNext($id) {
107 return 1;
108 }
109
110 /**
111 * [Describe function...]
112 *
113 * @param [type] $icon: ...
114 * @param [type] $row: ...
115 * @return [type] ...
116 */
117 function wrapIcon($icon,$row) {
118 return $icon;
119 }
120
121 /**
122 * [Describe function...]
123 *
124 * @param [type] $row: ...
125 * @param [type] $a: ...
126 * @param [type] $c: ...
127 * @param [type] $nextCount: ...
128 * @param [type] $exp: ...
129 * @return [type] ...
130 */
131 function PMicon($row,$a,$c,$nextCount,$exp) {
132 $PM = 'join';
133 $BTM = ($a==$c)?'bottom':'';
134 $icon = '<img src="'.$this->backPath.'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" alt="" />';
135 return $icon;
136 }
137 }
138
139
140 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagetree.php']) {
141 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagetree.php']);
142 }
143 ?>