Skip to content
Snippets Groups Projects
Commit 033d1f1a authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

[TASK] migrate to Icons.php

parent a5027129
No related branches found
No related tags found
No related merge requests found
<?php
/**
* Important! Do not return a variable named $icons, because it will result in an error.
* The core requires this file and then the variable names will clash.
* Either use a closure here, or do not call your variable $icons.
*/
$iconList = [];
foreach (['extension-sg_youtube' => 'youtube.svg'] as $identifier => $path) {
$iconList[$identifier] = [
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
'source' => 'EXT:sg_youtube/Resources/Public/Icons/' . $path,
];
}
return $iconList;
ext_icon.png

825 B

......@@ -13,14 +13,6 @@
'@import "EXT:sg_youtube/Configuration/TsConfig/Page/NewContentElementWizard.tsconfig"'
);
// Register Icons
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'extension-sg_youtube',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:sg_youtube/Resources/Public/Icons/youtube.svg']
);
// Caching
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['sgyoutube_cache'] ??= [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment