Skip to content

Commit 1fbc093

Browse files
authored
Merge pull request #11 from b13/issue-6
[TASK] Inline getPackageIcon() for v12 support
2 parents 5d8ead5 + 3eb2918 commit 1fbc093

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Classes/Controller/RequestLogController.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@ private function resolveExtensionIcons(array $extensionKeys): array
172172
if (!$this->packageManager->isPackageActive($key)) {
173173
continue;
174174
}
175-
$iconPath = $this->packageManager->getPackage($key)->getPackageIcon();
176-
if ($iconPath !== null) {
177-
$icons[$key] = PathUtility::getAbsoluteWebPath(
178-
$this->packageManager->getPackage($key)->getPackagePath() . $iconPath
179-
);
175+
$packagePath = $this->packageManager->getPackage($key)->getPackagePath();
176+
foreach (['svg', 'png', 'gif'] as $extension) {
177+
$relativeIconPath = 'Resources/Public/Icons/Extension.' . $extension;
178+
if (file_exists($packagePath . $relativeIconPath)) {
179+
$icons[$key] = PathUtility::getAbsoluteWebPath($packagePath . $relativeIconPath);
180+
break;
181+
}
180182
}
181183
}
182184
return $icons;

0 commit comments

Comments
 (0)