TYPO3  7.6
Tree/View/PageTreeView.php
Go to the documentation of this file.
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 
19 
24 {
28  public $fieldArray = array(
29  'uid',
30  'pid',
31  'title',
32  'doktype',
33  'nav_title',
34  'mount_pid',
35  'php_tree_stop',
36  't3ver_id',
37  't3ver_state',
38  'hidden',
39  'starttime',
40  'endtime',
41  'fe_group',
42  'module',
43  'extendToSubpages',
44  'nav_hide'
45  );
46 
51  public $treeName = 'pages';
52 
57  public $table = 'pages';
58 
62  public $ext_showNavTitle = false;
63 
72  public function init($clause = '', $orderByFields = '')
73  {
74  parent::init(' AND deleted=0 ' . $clause, 'sorting');
75  }
76 
83  public function expandNext($id)
84  {
85  return 1;
86  }
87 
101  public function PMicon($row, $a, $c, $nextCount, $isExpand)
102  {
103  return '<span class="treeline-icon treeline-icon-join' . ($a == $c ? 'bottom' : '') . '"></span>';
104  }
105 
113  public function initializePositionSaving()
114  {
115  $this->stored = array();
116  }
117 
126  public function getTitleStr($row, $titleLen = 30)
127  {
129  $lang = $GLOBALS['LANG'];
130  if ($this->ext_showNavTitle && trim($row['nav_title']) !== '') {
131  $title = '<span title="' . $lang->sL('LLL:EXT:lang/locallang_tca.xlf:title', true) . ' ' . htmlspecialchars(trim($row['title'])) . '">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen)) . '</span>';
132  } else {
133  $title = htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], $titleLen));
134  if (trim($row['nav_title']) !== '') {
135  $title = '<span title="' . $lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title', true) . ' ' . htmlspecialchars(trim($row['nav_title'])) . '">' . $title . '</span>';
136  }
137  $title = trim($row['title']) === '' ? '<em>[' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title', true) . ']</em>' : $title;
138  }
139  return $title;
140  }
141 }