‪TYPO3CMS  ‪main
PageTreeView.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 
28 {
36  public function ‪init(‪$clause = '', ‪$orderByFields = '')
37  {
38  parent::init(' AND deleted=0 AND sys_language_uid=0 ' . ‪$clause, ‪$orderByFields ?: 'sorting');
39  }
40 
47  public function ‪expandNext($id)
48  {
49  return true;
50  }
51 
64  protected function ‪PMicon($row, $a, $c, $nextCount, $isExpand)
65  {
66  return '<span class="treeline-icon treeline-icon-join' . ($a == $c ? 'bottom' : '') . '"></span>';
67  }
68 
77  protected function ‪getTitleStr($row, $titleLen = 30)
78  {
79  $lang = $this->‪getLanguageService();
80  $title = htmlspecialchars(‪GeneralUtility::fixed_lgd_cs($row['title'], (int)$titleLen));
81  if (isset($row['nav_title']) && trim($row['nav_title']) !== '') {
82  $title = '<span title="'
83  . htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title'))
84  . ' ' . htmlspecialchars(trim($row['nav_title'])) . '">' . $title
85  . '</span>';
86  }
87  return trim($row['title']) === ''
88  ? '<em>[' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.no_title')) . ']</em>'
89  : $title;
90  }
91 }
‪TYPO3\CMS\Core\Utility\GeneralUtility\fixed_lgd_cs
‪static string fixed_lgd_cs(string $string, int $chars, string $appendString='...')
Definition: GeneralUtility.php:92
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\PMicon
‪string PMicon($row, $a, $c, $nextCount, $isExpand)
Definition: PageTreeView.php:64
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$clause
‪string $clause
Definition: AbstractTreeView.php:56
‪TYPO3\CMS\Backend\Tree\View\PageTreeView
Definition: PageTreeView.php:28
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\expandNext
‪bool expandNext($id)
Definition: PageTreeView.php:47
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$orderByFields
‪string $orderByFields
Definition: AbstractTreeView.php:63
‪TYPO3\CMS\Backend\Tree\View
Definition: AbstractContentPagePositionMap.php:18
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\init
‪init($clause='', $orderByFields='')
Definition: PageTreeView.php:36
‪TYPO3\CMS\Backend\Tree\View\PageTreeView\getTitleStr
‪string getTitleStr($row, $titleLen=30)
Definition: PageTreeView.php:77
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getLanguageService
‪getLanguageService()
Definition: AbstractTreeView.php:471
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView
Definition: AbstractTreeView.php:39