[TASK] Replace sprite icon "apps-pagetree-page-default" with the new IconFactory 06/43206/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 11 Sep 2015 14:27:07 +0000 (16:27 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Fri, 11 Sep 2015 14:58:57 +0000 (16:58 +0200)
Replaces all IconUtility::getSpriteIcon calls for the1icon
apps-pagetree-page-default with the new IconFactory.

Resolves: #69681
Releases: master
Change-Id: Idacb4579b4ef28b073827f8d8905c2ccb7c25d0c
Reviewed-on: http://review.typo3.org/43206
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php

index 6fad48f..e9b0294 100644 (file)
@@ -70,6 +70,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-domain.png',
                        )
                ),
+               'apps-pagetree-page-default' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-default.png',
+                       )
+               ),
                'apps-pagetree-root' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
index a22a852..f5bf8c1 100755 (executable)
@@ -408,8 +408,10 @@ class AdminPanelView {
                        $beUser->extPageInTreeInfo = array();
                        $beUser->extPageInTreeInfo[] = array($tsfe->page['uid'], htmlspecialchars($tsfe->page['title']), $depth + 1);
                        $beUser->extGetTreeList($tsfe->id, $depth, 0, $beUser->getPagePermsClause(1));
+                       /** @var IconFactory $iconFactory */
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        foreach ($beUser->extPageInTreeInfo as $key => $row) {
-                               $outTable .= '<tr class="typo3-adminPanel-itemRow ' . ($key % 2 == 0 ? 'line-even' : 'line-odd') . '">' . '<td><span style="width: ' . ($depth + 1 - $row[2]) * 18 . 'px; height: 1px; display: inline-block;"></span>' . IconUtility::getSpriteIcon('apps-pagetree-page-default') . htmlspecialchars($row[1]) . '</td><td>' . $beUser->extGetNumberOfCachedPages($row[0]) . '</td></tr>';
+                               $outTable .= '<tr class="typo3-adminPanel-itemRow ' . ($key % 2 == 0 ? 'line-even' : 'line-odd') . '">' . '<td><span style="width: ' . ($depth + 1 - $row[2]) * 18 . 'px; height: 1px; display: inline-block;"></span>' . $iconFactory->getIcon('apps-pagetree-page-default', Icon::SIZE_SMALL) . htmlspecialchars($row[1]) . '</td><td>' . $beUser->extGetNumberOfCachedPages($row[0]) . '</td></tr>';
                        }
                        $outTable = '<table class="typo3-adminPanel-table"><thead><tr><th colspan="2">' . $this->extGetLL('cache_cacheEntries') . '</th></tr></thead>' . $outTable . '</table>';
                        $outTable .= '<span class="fa fa-bolt clear-cache-icon"><!-- --></span><input class="btn btn-default clear-cache" type="submit" name="TSFE_ADMIN_PANEL[action][clearCache]" value="' . $this->extGetLL('cache_doit') . '" />';