Initial revision
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_pagetree.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2003 Kasper Skårhøj (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 * Revised for TYPO3 3.6 August/2003 by Kasper Skårhøj
31 *
32 * @author Kasper Skårhøj <kasper@typo3.com>
33 * @coauthor René Fritz <r.fritz@colorcube.de>
34 * Maintained by René Fritz
35 */
36 /**
37 * [CLASS/FUNCTION INDEX of SCRIPT]
38 *
39 *
40 *
41 * 72: class t3lib_pageTree extends t3lib_treeView
42 * 94: function init($clause='')
43 * 109: function expandNext($id)
44 * 120: function wrapIcon($icon,$row)
45 * 134: function PMicon($row,$a,$c,$nextCount,$exp)
46 *
47 * TOTAL FUNCTIONS: 4
48 * (This index is automatically created/updated by the extension "extdeveval")
49 *
50 */
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67 require_once (PATH_t3lib."class.t3lib_treeview.php");
68
69 /**
70 * @author Kasper Skårhøj <kasper@typo3.com>
71 * @coauthor René Fritz <r.fritz@colorcube.de>
72 * @package TYPO3
73 * @subpackage t3lib
74 */
75 class t3lib_pageTree extends t3lib_treeView{
76 var $makeHTML=1;
77
78 var $clause=' AND NOT deleted';
79 var $db;
80 var $fieldArray = Array('uid','title','doktype','php_tree_stop');
81 var $defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id';
82 var $setRecs = 0;
83
84 /**
85 * @param [type] $clause: ...
86 * @return [type] ...
87 */
88 function init($clause='') {
89 parent::init($clause);
90 if (t3lib_extMgm::isLoaded('cms')) {
91 $this->fieldArray=array_merge($this->fieldArray,array('hidden','starttime','endtime','fe_group','module','extendToSubpages'));
92 }
93 $this->table='pages';
94 $this->treeName='pages';
95 }
96
97 /**
98 * [Describe function...]
99 *
100 * @param [type] $id: ...
101 * @return [type] ...
102 */
103 function expandNext($id) {
104 return 1;
105 }
106
107 /**
108 * [Describe function...]
109 *
110 * @param [type] $icon: ...
111 * @param [type] $row: ...
112 * @return [type] ...
113 */
114 function wrapIcon($icon,$row) {
115 return $icon;
116 }
117
118 /**
119 * [Describe function...]
120 *
121 * @param [type] $row: ...
122 * @param [type] $a: ...
123 * @param [type] $c: ...
124 * @param [type] $nextCount: ...
125 * @param [type] $exp: ...
126 * @return [type] ...
127 */
128 function PMicon($row,$a,$c,$nextCount,$exp) {
129 $PM = 'join';
130 $BTM = ($a==$c)?'bottom':'';
131 $icon = '<img src="'.$this->backPath.'t3lib/gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" alt="" />';
132 return $icon;
133 }
134 }
135
136
137 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagetree.php']) {
138 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagetree.php']);
139 }
140 ?>