ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
TopParentItem.php
Go to the documentation of this file.
1
<?php
namespace
ILIAS\GlobalScreen\Scope\MetaBar\Factory
;
2
3
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
4
use
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\TopParentItemRenderer
;
5
use
ILIAS\UI\Component\Symbol\Glyph\Glyph
;
6
use
ILIAS\UI\Component\Symbol\Symbol
;
7
13
class
TopParentItem
extends
AbstractBaseItem
implements
isItem
,
hasSymbol
,
hasTitle
,
isParent
14
{
15
19
protected
$children
= [];
23
protected
$glyph
;
27
protected
$title
=
""
;
28
29
33
public
function
__construct
(
IdentificationInterface
$provider_identification
)
34
{
35
parent::__construct
($provider_identification);
36
$this->renderer =
new
TopParentItemRenderer
();
37
}
38
39
43
public
function
withSymbol
(
Symbol
$symbol) :
hasSymbol
44
{
45
$clone = clone($this);
46
$clone->glyph = $symbol;
47
48
return
$clone;
49
}
50
51
55
public
function
getSymbol
() :
Symbol
56
{
57
return
$this->glyph
;
58
}
59
60
64
public
function
hasSymbol
() : bool
65
{
66
return
($this->glyph instanceof
Symbol
);
67
}
68
69
73
public
function
withTitle
(
string
$title
) :
hasTitle
74
{
75
$clone = clone($this);
76
$clone->title =
$title
;
77
78
return
$clone;
79
}
80
81
85
public
function
getTitle
() : string
86
{
87
return
$this->title
;
88
}
89
90
94
public
function
getChildren
() : array
95
{
96
return
$this->children
;
97
}
98
99
103
public
function
withChildren
(array
$children
) :
isParent
104
{
105
$clone = clone($this);
106
$clone->children =
$children
;
107
108
return
$clone;
109
}
110
111
115
public
function
appendChild
(
isChild
$child) :
isParent
116
{
117
$this->children[] = $child;
118
119
return
$this;
120
}
121
122
126
public
function
hasChildren
() : bool
127
{
128
return
count($this->children) > 0;
129
}
130
}
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\withTitle
withTitle(string $title)
Definition:
TopParentItem.php:73
Glyph
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:11
ILIAS\GlobalScreen\Scope\MetaBar\Factory\AbstractBaseItem
Class AbstractBaseItem.
Definition:
AbstractBaseItem.php:13
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:8
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\hasChildren
hasChildren()
Definition:
TopParentItem.php:126
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:8
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\TopParentItemRenderer
Class TopParentItemRenderer.
Definition:
TopParentItemRenderer.php:12
ILIAS\GlobalScreen\Scope\MetaBar\Factory\AbstractBaseItem\$provider_identification
$provider_identification
Definition:
AbstractBaseItem.php:31
Symbol
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\getSymbol
getSymbol()
Definition:
TopParentItem.php:55
ILIAS\GlobalScreen\Scope\MetaBar\Factory
Definition:
AbstractBaseItem.php:1
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\__construct
__construct(IdentificationInterface $provider_identification)
Definition:
TopParentItem.php:33
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isParent
Interface isParent.
Definition:
isParent.php:8
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\appendChild
appendChild(isChild $child)
Definition:
TopParentItem.php:115
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isChild
Interface isChild.
Definition:
isChild.php:10
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\$children
$children
Definition:
TopParentItem.php:19
IdentificationInterface
TopParentItemRenderer
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\withChildren
withChildren(array $children)
Definition:
TopParentItem.php:103
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isItem
Class isItem.
Definition:
isItem.php:11
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem
Class BaseItem.
Definition:
TopParentItem.php:13
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\$title
$title
Definition:
TopParentItem.php:27
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasSymbol
Interface hasSymbol.
Definition:
hasSymbol.php:10
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:30
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\hasSymbol
hasSymbol()
Definition:
TopParentItem.php:64
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\$glyph
$glyph
Definition:
TopParentItem.php:23
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\getChildren
getChildren()
Definition:
TopParentItem.php:94
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\withSymbol
withSymbol(Symbol $symbol)
Definition:
TopParentItem.php:43
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\getTitle
getTitle()
Definition:
TopParentItem.php:85
src
GlobalScreen
Scope
MetaBar
Factory
TopParentItem.php
Generated on Tue Sep 2 2025 20:01:28 for ILIAS by
1.8.13 (using
Doxyfile
)