TYPO3 TCA Icons auswählen

Schumiel

Lieutenant
Registriert
Jan. 2010
Beiträge
825
Hallo,

ich möchte im TYPO3 v12 eine Icon-Palette von fontawesome zur Verfügung stellen. Jedoch werden die i-Tags nicht übersetzt. Jemand eine Idee, wie das möglich ist?

TCA-Datei:

PHP:
'icon' => [
    'exclude' => true,
    'label' => 'fontawesome Icon',
    'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'itemsProcFunc' => Test\Tests\UserFunction\BackendForm::class . '->itemsProcFunc',
    ],
],

BackendForm.php

PHP:
namespace Test\Tests\UserFunction;

class BackendForm
{
     * @param array $params
     */
    public function itemsProcFunc(&$params): void
    {
        $params['items'][] = ['label' => '<i class="fa fa-times" aria-hidden="true"></i>', 'value' => 'times'];
        $params['items'][] = ['label' => '<i class="fa fa-car" aria-hidden="true"></i>', 'value' => 'car'];
    }
}
 
Zuletzt bearbeitet:
Zurück
Oben