[TASK] Always use Icon API for Module Icons
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FormDataProvider / AbstractItemProvider.php
index 47f0370..7d815e9 100644 (file)
@@ -312,12 +312,13 @@ abstract class AbstractItemProvider
                         // Icon:
                         if (strpos($theMod, '_') !== false) {
                             list($mainModule, $subModule) = explode('_', $theMod, 2);
-                            $icon = $loadModules->modules[$mainModule]['sub'][$subModule]['icon'];
+                            $icon = $loadModules->modules[$mainModule]['sub'][$subModule]['iconIdentifier'];
                         } else {
-                            $icon = $loadModules->modules[$theMod]['icon'];
+                            $icon = $loadModules->modules[$theMod]['iconIdentifier'];
                         }
                         if ($icon) {
-                            $icon = '../' . PathUtility::stripPathSitePrefix($icon);
+                            $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                            $icon = $iconFactory->getIcon($icon)->render();
                         }
                         // Add help text
                         $helpText = [