‪TYPO3CMS  9.5
ContentLayoutPagePositionMap.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 
20 
27 {
32 
36  public ‪$l_insertNewRecordHere = 'newContentElement';
37 
45  public function ‪wrapRecordTitle($str, $row)
46  {
47  $aOnClick = 'jumpToUrl(' . GeneralUtility::quoteJSvalue($this->‪linkToCurrentModule(['edit_record' => 'tt_content:' . $row['uid']])) . ');return false;';
48  return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $str . '</a>';
49  }
50 
59  public function ‪wrapColumnHeader($str, $vv)
60  {
61  $aOnClick = 'jumpToUrl(' . GeneralUtility::quoteJSvalue($this->‪linkToCurrentModule(['edit_record' => '_EDIT_COL:' . $vv])) . ');return false;';
62  return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $str . '</a>';
63  }
64 
75  public function ‪onClickInsertRecord($row, $vv, ‪$moveUid, $pid, $sys_lang = 0)
76  {
77  if (is_array($row)) {
78  $linkInformation = 'tt_content:new/-' . $row['uid'] . '/' . $row['colPos'];
79  } else {
80  $linkInformation = 'tt_content:new/' . $pid . '/' . $vv;
81  }
82  $location = $this->‪linkToCurrentModule(['edit_record' => $linkInformation]);
83  return 'jumpToUrl(' . GeneralUtility::quoteJSvalue($location) . ');return false;';
84  }
85 
93  public function ‪wrapRecordHeader($str, $row)
94  {
95  if ($row['uid'] == $this->moveUid) {
97  ‪$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
98  return ‪$iconFactory->‪getIcon('status-status-current', ‪Icon::SIZE_SMALL)->‪render() . $str;
99  }
100  return $str;
101  }
102 
110  protected function ‪linkToCurrentModule($params)
111  {
112  unset($params['popView']);
113  unset($params['new_unique_uid']);
114  return GeneralUtility::linkThisScript($params);
115  }
116 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\$l_insertNewRecordHere
‪string $l_insertNewRecordHere
Definition: ContentLayoutPagePositionMap.php:34
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\onClickInsertRecord
‪string onClickInsertRecord($row, $vv, $moveUid, $pid, $sys_lang=0)
Definition: ContentLayoutPagePositionMap.php:73
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\$dontPrintPageInsertIcons
‪bool $dontPrintPageInsertIcons
Definition: ContentLayoutPagePositionMap.php:30
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Core\Imaging\Icon\render
‪string render($alternativeMarkupIdentifier=null)
Definition: Icon.php:231
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\wrapRecordTitle
‪string wrapRecordTitle($str, $row)
Definition: ContentLayoutPagePositionMap.php:43
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap
Definition: ContentLayoutPagePositionMap.php:27
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:31
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\wrapRecordHeader
‪string wrapRecordHeader($str, $row)
Definition: ContentLayoutPagePositionMap.php:91
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\linkToCurrentModule
‪string linkToCurrentModule($params)
Definition: ContentLayoutPagePositionMap.php:108
‪TYPO3\CMS\Backend\Tree\View\PagePositionMap
Definition: PagePositionMap.php:37
‪TYPO3\CMS\Backend\Tree\View\PagePositionMap\$iconFactory
‪IconFactory $iconFactory
Definition: PagePositionMap.php:115
‪TYPO3\CMS\Backend\Tree\View\ContentLayoutPagePositionMap\wrapColumnHeader
‪string wrapColumnHeader($str, $vv)
Definition: ContentLayoutPagePositionMap.php:57
‪TYPO3\CMS\Backend\Tree\View
Definition: AbstractTreeView.php:2
‪TYPO3\CMS\Backend\Tree\View\PagePositionMap\$moveUid
‪string $moveUid
Definition: PagePositionMap.php:81
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Core\Imaging\IconFactory\getIcon
‪Icon getIcon($identifier, $size=Icon::SIZE_DEFAULT, $overlayIdentifier=null, IconState $state=null)
Definition: IconFactory.php:73