Commit fa5ed078 authored by Morton Jonuschat's avatar Morton Jonuschat Committed by Frank Nägler
Browse files

[TASK] Replace sprite icon "apps-filetree-root" with the new IconFactory

Replaces all IconUtility::getSpriteIcon calls for the icon
apps-filetree-root with the new IconFactory.

Resolves: #69680
Releases: master
Change-Id: I4f3518c054f4cc9e7d4a61e17fee4b21aef4b681
Reviewed-on: http://review.typo3.org/43205


Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
parent df317a84
......@@ -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);
......
......@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Backend\Controller\File;
*/
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\Utility\GeneralUtility;
......@@ -114,7 +113,9 @@ class EditFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
}
// Setting the title and the icon
$icon = 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->fileObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileObject->getIdentifier());
// Setting template object
......
......@@ -105,7 +105,9 @@ class FileUploadController implements \TYPO3\CMS\Core\Http\ControllerInterface {
throw new \RuntimeException($title . ': ' . $message, 1294586843);
}
// 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);
......
......@@ -114,7 +114,9 @@ class RenameFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
}
}
// Setting icon and title
$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->fileOrFolderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileOrFolderObject->getIdentifier());
// Setting template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
......
......@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Backend\Controller\File;
use TYPO3\CMS\Backend\Template\DocumentTemplate;
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\Resource\Exception\InsufficientFileAccessPermissionsException;
......@@ -120,7 +119,9 @@ class ReplaceFileController implements \TYPO3\CMS\Core\Http\ControllerInterface
}
}
// Setting icon and title
$icon = 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->fileOrFolderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileOrFolderObject->getIdentifier());
// Setting template object
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
......
......@@ -46,6 +46,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'source' => 'EXT:t3skin/images/icons/apps/filetree-folder-default.png',
)
),
'apps-filetree-root' => array(
'provider' => BitmapIconProvider::class,
'options' => array(
'source' => 't3skin/images/icons/apps/filetree-root.png',
)
),
'apps-toolbar-menu-cache' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment