TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
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 
18 
23 {
27  public $fieldArray = [
28  'uid',
29  'pid',
30  'title',
31  'doktype',
32  'nav_title',
33  'mount_pid',
34  'php_tree_stop',
35  't3ver_id',
36  't3ver_state',
37  'hidden',
38  'starttime',
39  'endtime',
40  'fe_group',
41  'module',
42  'extendToSubpages',
43  'nav_hide'
44  ];
45 
50  public $treeName = 'pages';
51 
56  public $table = 'pages';
57 
61  public $ext_showNavTitle = false;
62 
71  public function init($clause = '', $orderByFields = '')
72  {
73  parent::init(' AND deleted=0 ' . $clause, 'sorting');
74  }
75 
82  public function expandNext($id)
83  {
84  return 1;
85  }
86 
100  public function PMicon($row, $a, $c, $nextCount, $isExpand)
101  {
102  return '<span class="treeline-icon treeline-icon-join' . ($a == $c ? 'bottom' : '') . '"></span>';
103  }
104 
112  public function initializePositionSaving()
113  {
114  $this->stored = [];
115  }
116 
125  public function getTitleStr($row, $titleLen = 30)
126  {
127  $lang = $this->getLanguageService();
128  if ($this->ext_showNavTitle && isset($row['nav_title']) && trim($row['nav_title']) !== '') {
129  $title = '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:title')) . ' '
130  . htmlspecialchars(trim($row['title'])) . '">'
131  . htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen))
132  . '</span>';
133  } else {
134  $title = htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], $titleLen));
135  if (isset($row['nav_title']) && trim($row['nav_title']) !== '') {
136  $title = '<span title="'
137  . htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title'))
138  . ' ' . htmlspecialchars(trim($row['nav_title'])) . '">' . $title
139  . '</span>';
140  }
141  $title = trim($row['title']) === ''
142  ? '<em>[' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.no_title')) . ']</em>'
143  : $title;
144  }
145  return $title;
146  }
147 }
PMicon($row, $a, $c, $nextCount, $isExpand)