[TASK] Replace sprite icon "apps-filetree-root" with the new IconFactory
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Controller / File / CreateFolderController.php
index 62a47fa..7152778 100644 (file)
@@ -90,6 +90,7 @@ class CreateFolderController implements \TYPO3\CMS\Core\Http\ControllerInterface
        /**
         * Initialize
         *
+        * @throws \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException
         * @return void
         */
        protected function init() {
@@ -112,7 +113,9 @@ class CreateFolderController implements \TYPO3\CMS\Core\Http\ControllerInterface
                }
 
                // Setting the title and the icon
-               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $icon = $iconFactory->getIcon('apps-filetree-root', Icon::SIZE_SMALL);
                $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
                // Setting template object
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);