1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
<?php
/***************************************************************
* Copyright notice
*
* (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Generate a page-tree, non-browsable.
*
* $Id: class.t3lib_pagetree.php 809 2005-10-04 12:03:20Z typo3 $
* Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
*
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
* @coauthor Ren Fritz <r.fritz@colorcube.de>
*/
/**
* [CLASS/FUNCTION INDEX of SCRIPT]
*
*
*
* 78: class t3lib_pageTree extends t3lib_treeView
* 90: function init($clause='')
* 106: function expandNext($id)
* 123: function PMicon($row,$a,$c,$nextCount,$exp)
* 138: function initializePositionSaving()
*
* TOTAL FUNCTIONS: 4
* (This index is automatically created/updated by the extension "extdeveval")
*
*/
require_once (PATH_t3lib.'class.t3lib_treeview.php');
/**
* Class for generating a page tree.
*
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
* @coauthor Ren Fritz <r.fritz@colorcube.de>
* @see t3lib_treeView, t3lib_browseTree
* @package TYPO3
* @subpackage t3lib
*/
class t3lib_pageTree extends t3lib_treeView {
var $fieldArray = Array('uid','title','doktype','php_tree_stop','t3ver_id','t3ver_state','t3ver_swapmode');
var $defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id';
var $setRecs = 0;
/**
* Init function
* REMEMBER to feed a $clause which will filter out non-readable pages!
*
* @param string Part of where query which will filter out non-readable pages.
* @return void
*/
function init($clause='') {
parent::init(' AND deleted=0 '.$clause, 'sorting');
if (t3lib_extMgm::isLoaded('cms')) {
$this->fieldArray=array_merge($this->fieldArray,array('hidden','starttime','endtime','fe_group','module','extendToSubpages'));
}
$this->table='pages';
$this->treeName='pages';
}
/**
* Returns true/false if the next level for $id should be expanded - and all levels should, so we always return 1.
*
* @param integer ID (uid) to test for (see extending classes where this is checked againts session data)
* @return boolean
*/
function expandNext($id) {
return 1;
}
/**
* Generate the plus/minus icon for the browsable tree.
* In this case, there is no plus-minus icon displayed.
*
* @param array record for the entry
* @param integer The current entry number
* @param integer The total number of entries. If equal to $a, a 'bottom' element is returned.
* @param integer The number of sub-elements to the current element.
* @param boolean The element was expanded to render subelements if this flag is set.
* @return string Image tag with the plus/minus icon.
* @access private
* @see t3lib_treeView::PMicon()
*/
function PMicon($row,$a,$c,$nextCount,$exp) {
$PM = 'join';
$BTM = ($a==$c)?'bottom':'';
$icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' alt="" />';
return $icon;
}
/**
* Get stored tree structure AND updating it if needed according to incoming PM GET var.
* - Here we just set it to nothing since we want to just render the tree, nothing more.
*
* @return void
* @access private
*/
function initializePositionSaving() {
$this->stored=array();
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagetree.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagetree.php']);
}
?>
|