[FOLLOWUP][TASK] Replace icon "status-status-permission-denied" with the new IconFactory 35/43235/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Sat, 12 Sep 2015 12:00:47 +0000 (14:00 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 12 Sep 2015 12:14:58 +0000 (14:14 +0200)
This reverts a wrongly introduced getIcon() call.

Resolves: #69692
Releases: master
Change-Id: I80ec5307278c6b289fba60631ad36eddf7951df4
Reviewed-on: http://review.typo3.org/43235
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
typo3/sysext/beuser/Classes/ViewHelpers/PermissionsViewHelper.php

index ee24625..0708a89 100644 (file)
@@ -15,8 +15,6 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
  */
 
 use TYPO3\CMS\Backend\Utility\IconUtility;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
@@ -69,13 +67,11 @@ class PermissionsViewHelper extends AbstractViewHelper implements CompilableInte
        static public function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
                // The two main icon classes are static during one call. They trigger relatively expensive
                // calculation with a signal and object creation and thus make sense to have them cached.
-               /** @var IconFactory $iconFactory */
-               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                if (!static::$grantedCssClasses) {
                        static::$grantedCssClasses = IconUtility::getSpriteIconClasses('status-status-permission-granted');
                }
                if (!static::$deniedCssClasses) {
-                       static::$deniedCssClasses = $iconFactory->getIcon('status-status-permission-denied')->render();
+                       static::$deniedCssClasses = IconUtility::getSpriteIconClasses('status-status-permission-denied');
                }
 
                $masks = array(1, 16, 2, 4, 8);