‪TYPO3CMS  11.5
ImagePreviewRenderer.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 use TYPO3\CMS\Backend\Utility\BackendUtility;
23 
29 {
31  {
32  $row = $item->‪getRecord();
33  $content = $this->‪linkEditContent(BackendUtility::thumbCode($row, 'tt_content', 'image', '', '', null, 0, '', '', false), $row);
34 
35  $fileReferences = BackendUtility::resolveFileReferences('tt_content', 'image', $row);
36 
37  if (!empty($fileReferences)) {
38  $linkedContent = '';
39 
40  foreach ($fileReferences as $fileReference) {
41  $description = $fileReference->getDescription();
42  if ($description !== null && $description !== '') {
43  $linkedContent .= htmlspecialchars($description) . '<br />';
44  }
45  }
46 
47  $content .= $this->‪linkEditContent($linkedContent, $row);
48  }
49  return $content;
50  }
51 }
‪TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer
Definition: StandardContentPreviewRenderer.php:50
‪TYPO3\CMS\Frontend\Preview
Definition: ImagePreviewRenderer.php:18
‪TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem\getRecord
‪getRecord()
Definition: GridColumnItem.php:187
‪TYPO3\CMS\Frontend\Preview\ImagePreviewRenderer
Definition: ImagePreviewRenderer.php:29
‪TYPO3\CMS\Frontend\Preview\ImagePreviewRenderer\renderPageModulePreviewContent
‪renderPageModulePreviewContent(GridColumnItem $item)
Definition: ImagePreviewRenderer.php:30
‪TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\linkEditContent
‪string linkEditContent(string $linkText, $row)
Definition: StandardContentPreviewRenderer.php:410
‪TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem
Definition: GridColumnItem.php:44