]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5694 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Jan 2023 15:24:19 +0000 (16:24 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Jan 2023 15:24:19 +0000 (16:24 +0100)
app/Models/ToolSVGSprite.php

index abe80aa68f0d5b2549143bcbe61656605fa32f28..3e73e8a3cced25a4f9d9bb70a24a6d810a5f3968 100644 (file)
@@ -8,6 +8,7 @@ use App\SubForms\ToolSVGSpriteIcon;
 use Cubist\Backpack\Magic\Fields\BunchOfFieldsMultiple;
 use Cubist\Backpack\Magic\Fields\Checkbox;
 use Cubist\Backpack\Magic\Fields\Text;
+use Cubist\Util\Str;
 use Fluidbook\Tools\SVG\SVGTools;
 
 class ToolSVGSprite extends ToolboxModel
@@ -40,6 +41,7 @@ class ToolSVGSprite extends ToolboxModel
         $icons = [];
         foreach ($this->icons as $k => $icon) {
             $icon['svgcode'] = SVGTools::optimizeSVGStr($icon['svgcode']);
+            $icon['iconname'] = Str::slug(mb_strtolower(\Cubist\Util\Text::removeAccents($icon['iconname'])));
             $icons[$k] = $icon;
         }
         $this->icons = $icons;