Feature: #101133 - Native enum IconState

See forge#101133

Description

A new native backed enum \TYPO3\CMS\Core\Imaging\IconState has been introduced for streamlined usage within \TYPO3\CMS\Core\Imaging\Icon and \TYPO3\CMS\Core\Imaging\IconFactory.

Impact

The new \TYPO3\CMS\Core\Imaging\IconState native backed enum is meant to be a drop-in replacement for the former \TYPO3\CMS\Core\Type\Icon\IconState 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
);