From 3d092c6aaffe030e3edab7e2143d27126655d406 Mon Sep 17 00:00:00 2001 From: Lukas Scharmer Date: Thu, 8 Jan 2026 11:39:25 +0100 Subject: [PATCH] UIComponent: Add PHP code for glyphs: select, unselect & clear --- .../ILIAS/UI/src/Component/Symbol/Glyph/Glyph.php | 3 +++ .../Component/Symbol/Glyph/Factory.php | 15 +++++++++++++++ .../Component/Symbol/Glyph/Glyph.php | 3 +++ .../src/templates/default/Symbol/tpl.glyph.html | 3 +++ .../UI/tests/Component/Symbol/Glyph/GlyphTest.php | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/components/ILIAS/UI/src/Component/Symbol/Glyph/Glyph.php b/components/ILIAS/UI/src/Component/Symbol/Glyph/Glyph.php index e965297f9334..611c6d16bc8a 100755 --- a/components/ILIAS/UI/src/Component/Symbol/Glyph/Glyph.php +++ b/components/ILIAS/UI/src/Component/Symbol/Glyph/Glyph.php @@ -88,6 +88,9 @@ interface Glyph extends Symbol, Clickable public const DRAG_HANDLE = "dragHandle"; public const CHECKED = "checked"; public const UNCHECKED = "unchecked"; + public const SELECT = 'select'; + public const UNSELECT = 'unselect'; + public const CLEAR = 'clear'; /** * Get the type of the glyph. diff --git a/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Factory.php b/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Factory.php index ce6025400941..bbcf19776cc9 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Factory.php +++ b/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Factory.php @@ -323,4 +323,19 @@ public function unchecked(): G\Glyph { return new Glyph(G\Glyph::UNCHECKED, "unchecked"); } + + public function select(): G\Glyph + { + return new Glyph(G\Glyph::SELECT, 'select'); + } + + public function unselect(): G\Glyph + { + return new Glyph(G\Glyph::UNSELECT, 'unselect'); + } + + public function clear(): G\Glyph + { + return new Glyph(G\Glyph::CLEAR, 'clear'); + } } diff --git a/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Glyph.php b/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Glyph.php index e43d6e4a574c..361c66a92637 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Glyph.php +++ b/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Glyph.php @@ -94,6 +94,9 @@ class Glyph implements C\Symbol\Glyph\Glyph self::DRAG_HANDLE, self::CHECKED, self::UNCHECKED, + self::SELECT, + self::UNSELECT, + self::CLEAR, ]; private string $type; diff --git a/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.html b/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.html index 324913696fd8..d69189b7ea0a 100755 --- a/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.html +++ b/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.html @@ -59,6 +59,9 @@ glyphicon-dragHandle glyphicon-checked glyphicon-unchecked + glyphicon-select + glyphicon-unselect + glyphicon-clear " aria-hidden="true"> diff --git a/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php b/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php index 8c43362d56d2..a6c9b1784fb9 100755 --- a/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php +++ b/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php @@ -106,6 +106,9 @@ public function getCounterFactory(): C\Factory G\Glyph::DRAG_HANDLE => "glyphicon glyphicon-dragHandle", G\Glyph::CHECKED => "glyphicon glyphicon-checked", G\Glyph::UNCHECKED => "glyphicon glyphicon-unchecked", + G\Glyph::SELECT => 'glyphicon glyphicon-select', + G\Glyph::UNSELECT => 'glyphicon glyphicon-unselect', + G\Glyph::CLEAR => 'glyphicon glyphicon-clear', ); public static array $aria_labels = array( @@ -169,6 +172,9 @@ public function getCounterFactory(): C\Factory G\Glyph::DRAG_HANDLE => "drag_handle", G\Glyph::CHECKED => "checked", G\Glyph::UNCHECKED => "unchecked", + G\Glyph::SELECT => 'select', + G\Glyph::UNSELECT => 'unselect', + G\Glyph::CLEAR => 'clear', ); #[\PHPUnit\Framework\Attributes\DataProvider('getGlyphTypeProvider')]