‪TYPO3CMS  10.4
ElementBrowserPageTreeView.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
28 {
36  public function ‪ext_isLinkable($doktype, $uid)
37  {
38  return true;
39  }
40 
49  public function ‪wrapTitle(‪$title, $v, ‪$ext_pArrPages = false)
50  {
51  if (‪$ext_pArrPages && $v['uid']) {
52  $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
53  $ficon = $iconFactory->getIconForRecord('pages', $v, ‪Icon::SIZE_SMALL)->render();
54  $out = '<span data-uid="' . htmlspecialchars($v['uid']) . '" data-table="pages" data-title="' . htmlspecialchars($v['title']) . '" data-icon="' . htmlspecialchars($ficon) . '">';
55  $out .= '<a href="#" data-close="1">' . ‪$title . '</a>';
56  $out .= '</span>';
57  return $out;
58  }
59 
60  $parameters = ‪HttpUtility::buildQueryString($this->linkParameterProvider->getUrlParameters(['pid' => $v['uid']]));
61  return '<a href="' . htmlspecialchars($this->‪getThisScript() . $parameters) . '">' . ‪$title . '</a>';
62  }
63 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Backend\Tree\View\ElementBrowserPageTreeView
Definition: ElementBrowserPageTreeView.php:30
‪TYPO3\CMS\Recordlist\Tree\View\ElementBrowserPageTreeView\wrapTitle
‪string wrapTitle($title, $v, $ext_pArrPages=false)
Definition: ElementBrowserPageTreeView.php:49
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$title
‪string $title
Definition: AbstractTreeView.php:74
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:33
‪TYPO3\CMS\Recordlist\Tree\View\ElementBrowserPageTreeView\ext_isLinkable
‪bool ext_isLinkable($doktype, $uid)
Definition: ElementBrowserPageTreeView.php:36
‪TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString
‪static string buildQueryString(array $parameters, string $prependCharacter='', bool $skipEmptyParameters=false)
Definition: HttpUtility.php:163
‪TYPO3\CMS\Recordlist\Tree\View
Definition: DummyLinkParameterProvider.php:16
‪TYPO3\CMS\Backend\Tree\View\ElementBrowserPageTreeView\$ext_pArrPages
‪bool $ext_pArrPages
Definition: ElementBrowserPageTreeView.php:40
‪TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getThisScript
‪string getThisScript()
Definition: AbstractTreeView.php:250
‪TYPO3\CMS\Core\Utility\HttpUtility
Definition: HttpUtility.php:24
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46