[!!!][TASK] Move non-namespaced classes into correct places
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Tree / View / ContentMovingPagePositionMap.php
1 <?php
2 namespace TYPO3\CMS\Backend\Tree\View;
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
17 /**
18 * Position map class for moving content elements,
19 * previously resided in typo3/move_el.php
20 *
21 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
22 */
23 class ContentMovingPagePositionMap extends PagePositionMap {
24
25 /**
26 * @var int
27 */
28 public $dontPrintPageInsertIcons = 1;
29
30 /**
31 * Page tree implementation class name
32 *
33 * @var string
34 */
35 protected $pageTreeClassName = MoveElementPageTreeView::class;
36
37 /**
38 * Wrapping page title.
39 *
40 * @param string $str Page title.
41 * @param array $rec Page record (?)
42 * @return string Wrapped title.
43 */
44 public function linkPageTitle($str, $rec) {
45 $url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => (int)$rec['uid'], 'moveUid' => $GLOBALS['SOBE']->moveUid));
46 return '<a href="' . htmlspecialchars($url) . '">' . $str . '</a>';
47 }
48
49 /**
50 * Wrapping the title of the record.
51 *
52 * @param string $str The title value.
53 * @param array $row The record row.
54 * @return string Wrapped title string.
55 */
56 public function wrapRecordTitle($str, $row) {
57 if ($GLOBALS['SOBE']->moveUid == $row['uid']) {
58 $str = '<strong>' . $str . '</strong>';
59 }
60 return parent::wrapRecordTitle($str, $row);
61 }
62 }