[TASK] Replace sprite icon "actions-document-history-open" with the new IconFactory
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / EditDocumentController.php
index acf828c..31d50a9 100644 (file)
@@ -21,6 +21,8 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
 use TYPO3\CMS\Core\Html\HtmlParser;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Page\PageRenderer;
@@ -412,12 +414,18 @@ class EditDocumentController {
         */
        protected $previewData = [];
 
+       /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
        /**
         * Constructor
         */
        public function __construct() {
                $GLOBALS['SOBE'] = $this;
                $this->getLanguageService()->includeLLFile('EXT:lang/locallang_alt_doc.xlf');
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
        }
 
        /**
@@ -1179,7 +1187,7 @@ class EditDocumentController {
                                                                )
                                                        )
                                                ) . '; return false;';
-                                       $buttons['history'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . IconUtility::getSpriteIcon('actions-document-history-open') . '</a>';
+                                       $buttons['history'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL) . '</a>';
                                }
                                // If only SOME fields are shown in the form, this will link the user to the FULL form:
                                if ($this->columnsOnly) {