PHP code example of oliverthiele / ot-iconselector

1. Go to this page and download the library: Download oliverthiele/ot-iconselector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oliverthiele / ot-iconselector example snippets


'icon_identifier' => [
    'config' => [
        'type' => 'input',
        'renderType' => 'otIconSelector',
        'iconDirectory' => 'EXT:my_sitepackage/Resources/Public/Icons/SVG/',
        'iconStyle' => 'solid',
    ],
],

'icon_identifier' => [
    'exclude' => true,
    'label' => 'Icon',
    'config' => [
        'type' => 'input',
        'renderType' => 'otIconSelector',
        // Optional overrides:
        // 'iconDirectory' => 'EXT:my_ext/Resources/Public/Icons/',
        // 'iconStyle' => 'solid',
        // 'maxResults' => 36,
        // 'favoriteGroup' => 'buttons',
    ],
],

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

'icon_identifier' => [
    'config' => [
        'type' => 'input',
        'renderType' => ExtensionManagementUtility::isLoaded('ot_iconselector')
            ? 'otIconSelector'
            : null,
        'size' => 30,
        'max' => 40,
    ],
],