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
TopParentItemDrilldownRenderer.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer
;
22
23
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
;
24
use
ILIAS\UI\Component\Component
;
25
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
;
26
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\Link
;
27
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\LinkList
;
28
use
ILIAS\Data\Factory
;
29
use
Exception
;
30
35
class
TopParentItemDrilldownRenderer
extends
BaseTypeRenderer
36
{
37
public
function
getComponentWithContent
(
isItem
$item) :
Component
38
{
39
$entries = [];
40
foreach
($item->getChildren() as $child) {
41
$entries[] = $this->
buildEntry
($child);
42
}
43
44
$dd = $this->ui_factory->menu()->drilldown($item->getTitle(), $entries);
45
46
return
$this->ui_factory->mainControls()->slate()->drilldown(
47
$item->getTitle(),
48
$this->
getStandardSymbol
($item),
49
$dd
50
);
51
}
52
53
protected
function
buildEntry
(
AbstractChildItem
$item) :
Component
54
{
55
$title = $item->getTitle();
56
$symbol = $this->
getStandardSymbol
($item);
57
$type
= get_class($item);
58
59
switch
(
$type
) {
60
case
Link::class:
61
$act = $this->
getDataFactory
()->uri(
62
$this->
getBaseURL
()
63
.
'/'
64
. $item->getAction()
65
);
66
$entry = $this->ui_factory->link()->bulky($symbol, $title, $act);
67
break
;
68
69
case
LinkList::class:
70
$links = [];
71
foreach
($item->getLinks() as $child) {
72
$links[] = $this->
buildEntry
($child);
73
}
74
$entry = $this->ui_factory->menu()->sub($title, $links);
75
break
;
76
77
default
:
78
throw
new
Exception
(
"Invalid type: "
.
$type
, 1);
79
}
80
81
return
$entry;
82
}
83
84
protected
function
getDataFactory
() :
Factory
85
{
86
return
new
Factory
();
87
}
88
89
private
function
getBaseURL
() : string
90
{
91
return
ILIAS_HTTP_PATH;
92
}
93
}
$type
$type
Definition:
proxy_ylocal.php:10
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\BaseTypeRenderer
Class BaseTypeRenderer.
Definition:
BaseTypeRenderer.php:40
ILIAS\UI\Component
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
Interface IFactory.
Definition:
isItem.php:31
Component
LinkList
Link
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\TopParentItemDrilldownRenderer
Render a TopItem as Drilldown (DD in Slate)
Definition:
TopParentItemDrilldownRenderer.php:35
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer
Definition:
BaseTypeRenderer.php:21
Factory
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\BaseTypeRenderer\getStandardSymbol
getStandardSymbol(isItem $item)
Definition:
BaseTypeRenderer.php:112
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:19
isItem
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\TopParentItemDrilldownRenderer\buildEntry
buildEntry(AbstractChildItem $item)
Definition:
TopParentItemDrilldownRenderer.php:53
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\TopParentItemDrilldownRenderer\getDataFactory
getDataFactory()
Definition:
TopParentItemDrilldownRenderer.php:84
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\TopParentItemDrilldownRenderer\getBaseURL
getBaseURL()
Definition:
TopParentItemDrilldownRenderer.php:89
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\TopParentItemDrilldownRenderer\getComponentWithContent
getComponentWithContent(isItem $item)
This is called in cases when the Full Item with it's content is needed, e.g.
Definition:
TopParentItemDrilldownRenderer.php:37
AbstractChildItem
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
Class AbstractBaseItem.
Definition:
AbstractChildItem.php:29
Exception
src
GlobalScreen
Scope
MainMenu
Collector
Renderer
TopParentItemDrilldownRenderer.php
Generated on Tue Apr 15 2025 21:01:36 for ILIAS by
1.8.13 (using
Doxyfile
)