Feature: #101133 - Native enum IconState
See forge#101133
Description
A new native backed enum \TYPO3\
has been
introduced for streamlined usage within \TYPO3\
and
\TYPO3\
.
Impact
The new \TYPO3\
native backed enum is meant
to be a drop-in replacement for the former
\TYPO3\
class.
Example
<?php
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Imaging\IconState;
use TYPO3\CMS\Core\Utility\GeneralUtility;
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$icon = $iconFactory->getIcon(
'my-icon',
TYPO3\CMS\Core\Imaging\Icon::SIZE_SMALL,
null,
IconState::STATE_DISABLED
);
Copied!