public static function getIcons(int $id = 1, int $typeNum = 0): array
    {
        $icons           = [];
        $typoScriptKey   = 'plugin.tx_twcomponentlibrary.settings.iconDirectories';
        $iconDirectories = TypoScriptUtility::extractTypoScriptKeyForPidAndType($id, $typeNum, $typoScriptKey);
        $iconDirectories = GeneralUtility::trimExplode(',', $iconDirectories['iconDirectories'], true);
        foreach ($iconDirectories as $iconDirectory) {
            $iconsBaseDirectory = GeneralUtility::getFileAbsFileName($iconDirectory);
            foreach (glob($iconsBaseDirectory.DIRECTORY_SEPARATOR.'*.svg') as $iconFile) {
                $iconBasename         = basename($iconFile);
                $iconName             = trim(preg_replace('/([A-Z])/', " $1",
                    pathinfo($iconBasename, PATHINFO_FILENAME)));
                $icons[$iconBasename] = $iconName;
            }
        }
        asort($icons);

        return $icons;
    }
public static function getIcons(int $id = 1, int $typeNum = 0): array
    {
        $icons           = [];
        $typoScriptKey   = 'plugin.tx_twcomponentlibrary.settings.iconDirectories';
        $iconDirectories = TypoScriptUtility::extractTypoScriptKeyForPidAndType($id, $typeNum, $typoScriptKey);
        $iconDirectories = GeneralUtility::trimExplode(',', $iconDirectories['iconDirectories'], true);
        foreach ($iconDirectories as $iconDirectory) {
            $iconsBaseDirectory = GeneralUtility::getFileAbsFileName($iconDirectory);
            foreach (glob($iconsBaseDirectory.DIRECTORY_SEPARATOR.'*.svg') as $iconFile) {
                $iconBasename         = basename($iconFile);
                $iconName             = trim(preg_replace('/([A-Z])/', " $1",
                    pathinfo($iconBasename, PATHINFO_FILENAME)));
                $icons[$iconBasename] = $iconName;
            }
        }
        asort($icons);

        return $icons;
    }
public static function getIcons ( int $ id = 1 , int $ typeNum = 0 ) : array { $ icons = [ ] ; $ typoScriptKey = 'plugin.tx_twcomponentlibrary.settings.iconDirectories' ; $ iconDirectories = TypoScriptUtility :: extractTypoScriptKeyForPidAndType ( $ id , $ typeNum , $ typoScriptKey ) ; $ iconDirectories = GeneralUtility :: trimExplode ( ',' , $ iconDirectories [ 'iconDirectories' ] , true ) ; foreach ( $ iconDirectories as $ iconDirectory ) { $ iconsBaseDirectory = GeneralUtility :: getFileAbsFileName ( $ iconDirectory ) ; foreach ( glob ( $ iconsBaseDirectory . DIRECTORY_SEPARATOR . '*.svg' ) as $ iconFile ) { $ iconBasename = basename ( $ iconFile ) ; $ iconName = trim ( preg_replace ( '/([A-Z])/' , " $1" , pathinfo ( $ iconBasename , PATHINFO_FILENAME ) ) ) ; $ icons [ $ iconBasename ] = $ iconName ; } } asort ( $ icons ) ; return $ icons ; }
Return all icon assets

@param int $id      Page ID
@param int $typeNum Page type

@return string[] Icon assets
@throws ServiceUnavailableException
Return all icon assets