ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
hasSymbolTrait.php
Go to the documentation of this file.
1
<?php
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
2
3
use
ILIAS\UI\Component\Symbol\Symbol
;
4
9
trait
hasSymbolTrait
10
{
14
protected
$symbol;
15
19
public
function
withSymbol
(
Symbol
$symbol) :
hasSymbol
20
{
21
// bugfix mantis 25526: make aria labels mandatory
22
if
(($symbol instanceof Icon\Icon || $symbol instanceof Glyph\Glyph)
23
&& ($symbol->getAriaLabel() ===
""
)) {
24
throw
new \LogicException(
"the symbol's aria label MUST be set to ensure accessibility"
);
25
}
26
27
$clone = clone $this;
28
$clone->symbol = $symbol;
29
30
return
$clone;
31
}
32
36
public
function
getSymbol
() :
Symbol
37
{
38
return
$this->symbol;
39
}
40
44
public
function
hasSymbol
() : bool
45
{
46
return
$this->symbol instanceof
Symbol
;
47
}
48
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\getSymbol
getSymbol()
Definition:
hasSymbolTrait.php:36
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:11
Symbol
hasSymbolTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
hasSymbol()
Definition:
hasSymbolTrait.php:44
ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol
withSymbol(Symbol $symbol)
Definition:
hasSymbolTrait.php:19
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
Interface hasSymbol Methods for Entries with Symbols.
Definition:
hasSymbol.php:11
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:1
src
GlobalScreen
Scope
MainMenu
Factory
hasSymbolTrait.php
Generated on Wed Apr 9 2025 20:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)