[TASK] Replace sprite icon "actions-document-history-open" with the new IconFactory
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / PageLayoutController.php
index d275aa9..0318ef3 100755 (executable)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Backend\Controller;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
@@ -298,6 +300,11 @@ class PageLayoutController {
         */
        public $contentElementCache = array();
 
+       /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
        /**
         * Initializing the module
         *
@@ -1106,6 +1113,9 @@ class PageLayoutController {
         * @return array all available buttons as an assoc. array
         */
        protected function getButtons($function = '') {
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+
                $lang = $this->getLanguageService();
                $buttons = array(
                        'view' => '',
@@ -1237,7 +1247,7 @@ class PageLayoutController {
                                                                        )
                                                                ) . '#latest'
                                                        ) . ');return false;') . '"
-                                               title="' . $lang->getLL('recordHistory', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-history-open') . '</a>';
+                                               title="' . $lang->getLL('recordHistory', TRUE) . '">' . $iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL) . '</a>';
                                }
                        }
                }