[BUGFIX] Show correct tooltip for page type "Mount Point"
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Tree / View / PageTreeView.php
1 <?php
2 namespace TYPO3\CMS\Backend\Tree\View;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16 /**
17 * Generate a page-tree, non-browsable.
18 *
19 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
20 * @coauthor René Fritz <r.fritz@colorcube.de>
21 */
22 class PageTreeView extends \TYPO3\CMS\Backend\Tree\View\AbstractTreeView {
23
24 /**
25 * @todo Define visibility
26 */
27 public $fieldArray = array(
28 'uid',
29 'title',
30 'doktype',
31 'mount_pid',
32 'php_tree_stop',
33 't3ver_id',
34 't3ver_state'
35 );
36
37 /**
38 * @todo Define visibility
39 */
40 public $defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id';
41
42 /**
43 * @todo Define visibility
44 */
45 public $setRecs = 0;
46
47 /**
48 * Init function
49 * REMEMBER to feed a $clause which will filter out non-readable pages!
50 *
51 * @param string $clause Part of where query which will filter out non-readable pages.
52 * @param string $orderByFields Record ORDER BY field
53 * @return void
54 * @todo Define visibility
55 */
56 public function init($clause = '', $orderByFields = '') {
57 parent::init(' AND deleted=0 ' . $clause, 'sorting');
58 $this->fieldArray = array_merge($this->fieldArray, array(
59 'hidden',
60 'starttime',
61 'endtime',
62 'fe_group',
63 'module',
64 'extendToSubpages',
65 'nav_hide'
66 ));
67 $this->table = 'pages';
68 $this->treeName = 'pages';
69 }
70
71 /**
72 * Returns TRUE/FALSE if the next level for $id should be expanded - and all levels should, so we always return 1.
73 *
74 * @param integer $id ID (uid) to test for (see extending classes where this is checked against session data)
75 * @return boolean
76 * @todo Define visibility
77 */
78 public function expandNext($id) {
79 return 1;
80 }
81
82 /**
83 * Generate the plus/minus icon for the browsable tree.
84 * In this case, there is no plus-minus icon displayed.
85 *
86 * @param array $row Record for the entry
87 * @param integer $a The current entry number
88 * @param integer $c The total number of entries. If equal to $a, a 'bottom' element is returned.
89 * @param integer $nextCount The number of sub-elements to the current element.
90 * @param boolean $exp The element was expanded to render subelements if this flag is set.
91 * @return string Image tag with the plus/minus icon.
92 * @access private
93 * @see AbstarctTreeView::PMicon()
94 * @todo Define visibility
95 */
96 public function PMicon($row, $a, $c, $nextCount, $exp) {
97 $PM = 'join';
98 $BTM = $a == $c ? 'bottom' : '';
99 $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('treeline-' . $PM . $BTM);
100 return $icon;
101 }
102
103 /**
104 * Get stored tree structure AND updating it if needed according to incoming PM GET var.
105 * - Here we just set it to nothing since we want to just render the tree, nothing more.
106 *
107 * @return void
108 * @access private
109 * @todo Define visibility
110 */
111 public function initializePositionSaving() {
112 $this->stored = array();
113 }
114
115 }