‪TYPO3CMS  9.5
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 AND sys_language_uid=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:core/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:core/Resources/Private/Language/locallang_core.xlf:labels.no_title')) . ']</em>'
142  : ‪$title;
143  }
144  return ‪$title;
145  }
146 }
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\$table
‪string $table
Definition: PageTreeView.php:54
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\PMicon
‪string PMicon($row, $a, $c, $nextCount, $isExpand)
Definition: PageTreeView.php:96
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$clause
‪string $clause
Definition: AbstractTreeView.php:118
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$title
‪string $title
Definition: AbstractTreeView.php:73
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\$treeName
‪string $treeName
Definition: PageTreeView.php:49
‪TYPO3\CMS\Backend\Tree\View\PageTreeView
Definition: PageTreeView.php:23
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\$ext_showNavTitle
‪bool $ext_showNavTitle
Definition: PageTreeView.php:58
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\expandNext
‪bool expandNext($id)
Definition: PageTreeView.php:78
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$orderByFields
‪string $orderByFields
Definition: AbstractTreeView.php:126
‪TYPO3\CMS\Backend\Tree\View
Definition: AbstractTreeView.php:2
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getLanguageService
‪LanguageService getLanguageService()
Definition: AbstractTreeView.php:1057
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\init
‪init($clause='', $orderByFields='')
Definition: PageTreeView.php:67
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\getTitleStr
‪string getTitleStr($row, $titleLen=30)
Definition: PageTreeView.php:120
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\initializePositionSaving
‪initializePositionSaving()
Definition: PageTreeView.php:107
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\$fieldArray
‪array $fieldArray
Definition: PageTreeView.php:26
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView
Definition: AbstractTreeView.php:33