Breaking: #69561 - Replace sprite icons with IconFactory in ContextMenu¶
See forge#69561
Description¶
SpriteIcon and standalone image support have been replaced with Icon
in
the context menu. All menu icons now need to be registered through the Icon
.
Impact¶
The User
options for items icon
and sprite
have no effect anymore,
and will deliver a blank placeholder image if icon
is not set.
Affected Installations¶
All installations that add or modify items in the ContextMenu.
Migration¶
Register the icon through the Icon
and set the icon
in the
item configuration.
// Register Icon
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'contextmenu-example',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
array(
'source' => 'EXT:example/Resources/Public/Icons/contextmenu-example.svg'
))
);
Copied!
options.contextMenu.table {
virtual_root.items {
9999 = ITEM
9999 {
name = contextmenuExample
label = LLL:EXT:example/Resources/Private/Language/locallang.xlf:contextmenu-example
iconName = contextmenu-example
callbackAction = exampleCallback
}
}
}
Copied!