ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
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
TreeTool.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\Tool\Factory
;
22
23
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
;
24
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle
;
25
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isTopItem
;
26
use
ILIAS\UI\Component\Symbol\Glyph
;
27
use
ILIAS\UI\Component\Symbol\Icon
;
28
use
ILIAS\UI\Component\Symbol\Symbol
;
29
use
ILIAS\UI\Component\Tree\Tree
;
30
use
LogicException
;
31
36
class
TreeTool
extends
AbstractBaseTool
implements
isTopItem
,
hasSymbol
,
isToolItem
37
{
38
use \ILIAS\GlobalScreen\Scope\SymbolDecoratorTrait
;
39
43
protected
$symbol
;
47
protected
$tree
;
51
protected
$title
;
52
57
public
function
withTitle
(
string
$title
) :
hasTitle
58
{
59
$clone = clone($this);
60
$clone->title =
$title
;
61
62
return
$clone;
63
}
64
68
public
function
getTitle
() : string
69
{
70
return
$this->title
;
71
}
72
76
public
function
withSymbol
(
Symbol
$symbol
) :
hasSymbol
77
{
78
// bugfix mantis 25526: make aria labels mandatory
79
if
(($symbol instanceof
Glyph
\
Glyph
&& $symbol->getAriaLabel() ===
""
) ||
80
($symbol instanceof
Icon
\
Icon
&& $symbol->getLabel() ===
""
)) {
81
throw
new
LogicException
(
"the symbol's aria label MUST be set to ensure accessibility"
);
82
}
83
84
$clone = clone($this);
85
$clone->symbol =
$symbol
;
86
87
return
$clone;
88
}
89
93
public
function
withTree
(
Tree
$tree
) : self
94
{
95
$clone = clone($this);
96
$clone->tree =
$tree
;
97
98
return
$clone;
99
}
100
104
public
function
getTree
() :
Tree
105
{
106
return
$this->tree
;
107
}
108
112
public
function
getSymbol
() :
Symbol
113
{
114
return
$this->symbol
;
115
}
116
120
public
function
hasSymbol
() : bool
121
{
122
return
($this->symbol instanceof
Symbol
);
123
}
124
}
LogicException
ILIAS\GlobalScreen\Scope\Tool\Factory\isToolItem
Interface isToolItem.
Definition:
isToolItem.php:31
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:11
Tree
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\withTitle
withTitle(string $title)
Definition:
TreeTool.php:57
isTopItem
ILIAS\GlobalScreen\Scope\SymbolDecoratorTrait
trait SymbolDecoratorTrait
Definition:
SymbolDecoratorTrait.php:37
ILIAS\UI\Component\Symbol\Icon\Icon
This describes how an icon could be modified during construction of UI.
Definition:
Icon.php:9
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\withSymbol
withSymbol(Symbol $symbol)
Definition:
TreeTool.php:76
Symbol
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool
Class TreeTool.
Definition:
TreeTool.php:36
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\getSymbol
getSymbol()
Definition:
TreeTool.php:112
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\$symbol
$symbol
Definition:
TreeTool.php:43
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\hasSymbol
hasSymbol()
Definition:
TreeTool.php:120
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isTopItem
Interface TopIs.
Definition:
isTopItem.php:26
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:26
ILIAS\UI\Component\Symbol\Glyph\Glyph
This describes how a glyph could be modified during construction of UI.
Definition:
Glyph.php:13
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
hasSymbol()
Definition:
hasSymbolTrait.php:66
ILIAS\UI\Component\Symbol\Glyph
Definition:
Factory.php:6
ILIAS\UI\Component\Symbol\Icon
Definition:
Custom.php:4
ILIAS\GlobalScreen\Scope\Tool\Factory
Definition:
AbstractBaseTool.php:21
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
Interface hasSymbol Methods for Entries with Symbols.
Definition:
hasSymbol.php:32
ILIAS\UI\Component\Tree\Tree
This describes a Tree Control.
Definition:
Tree.php:13
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\$tree
$tree
Definition:
TreeTool.php:47
ILIAS\GlobalScreen\Scope\Tool\Factory\AbstractBaseTool
Class AbstractBaseTool.
Definition:
AbstractBaseTool.php:31
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\$title
$title
Definition:
TreeTool.php:51
hasTitle
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\getTree
getTree()
Definition:
TreeTool.php:104
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\getTitle
getTitle()
Definition:
TreeTool.php:68
ILIAS\GlobalScreen\Scope\Tool\Factory\TreeTool\withTree
withTree(Tree $tree)
Definition:
TreeTool.php:93
src
GlobalScreen
Scope
Tool
Factory
TreeTool.php
Generated on Sun Apr 13 2025 21:01:49 for ILIAS by
1.8.13 (using
Doxyfile
)