/** * Force that icons are encoded as reference to the L.contao icon registry. * * @param EncodeValueEvent $event The subscribed event. * * @return void */ public function encodeIcons(EncodeValueEvent $event) { $value = $event->getValue(); if ($value instanceof Icon) { // Do not encode the icon, as it is generated in an separate icon file. $event->setSuccessful(); $event->stopPropagation(); } }