TYPO3 CMS  TYPO3_8-7
PageTreeView.php
Go to the documentation of this file.
1 <?php
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  'is_siteroot',
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 
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 
111  public function initializePositionSaving()
112  {
113  $this->stored = [];
114  }
115 
124  public function getTitleStr($row, $titleLen = 30)
125  {
126  $lang = $this->getLanguageService();
127  if ($this->ext_showNavTitle && isset($row['nav_title']) && trim($row['nav_title']) !== '') {
128  $title = '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:title')) . ' '
129  . htmlspecialchars(trim($row['title'])) . '">'
130  . htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen))
131  . '</span>';
132  } else {
133  $title = htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], $titleLen));
134  if (isset($row['nav_title']) && trim($row['nav_title']) !== '') {
135  $title = '<span title="'
136  . htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title'))
137  . ' ' . htmlspecialchars(trim($row['nav_title'])) . '">' . $title
138  . '</span>';
139  }
140  $title = trim($row['title']) === ''
141  ? '<em>[' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.no_title')) . ']</em>'
142  : $title;
143  }
144  return $title;
145  }
146 }
init($clause='', $orderByFields='')
PMicon($row, $a, $c, $nextCount, $isExpand)
static fixed_lgd_cs($string, $chars, $appendString='...')