ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
TopParentItem.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\MetaBar\Factory
;
22
23
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
24
use
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\TopParentItemRenderer
;
25
use
ILIAS\UI\Component\Symbol\Symbol
;
26
31
class
TopParentItem
extends
AbstractBaseItem
implements
isItem
,
hasSymbol
,
hasTitle
,
isParent
,
hasContentLanguage
32
{
33
use
ContentLanguage
;
34
use \ILIAS\GlobalScreen\Scope\SymbolDecoratorTrait
;
35
39
protected
array
$children
= [];
40
protected
?
Symbol
$symbol
= null;
41
protected
string
$title
=
""
;
42
46
public
function
__construct
(
IdentificationInterface
$provider_identification
)
47
{
48
parent::__construct
($provider_identification);
49
$this->renderer =
new
TopParentItemRenderer
();
50
}
51
55
public
function
withSymbol
(
Symbol
$symbol):
hasSymbol
56
{
57
$clone = clone($this);
58
$clone->symbol =
$symbol
;
59
60
return
$clone;
61
}
62
66
public
function
getSymbol
():
Symbol
67
{
68
return
$this->symbol
;
69
}
70
74
public
function
hasSymbol
(): bool
75
{
76
return
($this->
symbol
instanceof
Symbol
);
77
}
78
82
public
function
withTitle
(
string
$title):
hasTitle
83
{
84
$clone = clone($this);
85
$clone->title =
$title
;
86
87
return
$clone;
88
}
89
93
public
function
getTitle
(): string
94
{
95
return
$this->title
;
96
}
97
101
public
function
getChildren
(): array
102
{
103
return
$this->children
;
104
}
105
109
public
function
withChildren
(array $children):
isParent
110
{
111
$clone = clone($this);
112
$clone->children =
$children
;
113
114
return
$clone;
115
}
116
120
public
function
appendChild
(
isChild
$child):
isParent
121
{
122
$this->children[] = $child;
123
124
return
$this;
125
}
126
130
public
function
hasChildren
(): bool
131
{
132
return
count($this->children) > 0;
133
}
134
}
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\withTitle
withTitle(string $title)
Definition:
TopParentItem.php:82
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:29
ILIAS\GlobalScreen\Scope\MetaBar\Factory\AbstractBaseItem
Class AbstractBaseItem.
Definition:
AbstractBaseItem.php:32
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:27
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\$symbol
Symbol $symbol
Definition:
TopParentItem.php:40
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\hasChildren
hasChildren()
Definition:
TopParentItem.php:130
ILIAS\GlobalScreen\Scope\SymbolDecoratorTrait
trait SymbolDecoratorTrait
Definition:
SymbolDecoratorTrait.php:38
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:29
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasContentLanguage
Definition:
hasContentLanguage.php:23
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\TopParentItemRenderer
Class TopParentItemRenderer.
Definition:
TopParentItemRenderer.php:32
Symbol
ILIAS\GlobalScreen\Scope\MetaBar\Factory\AbstractBaseItem\$provider_identification
IdentificationInterface $provider_identification
Definition:
AbstractBaseItem.php:39
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\$children
array $children
Definition:
TopParentItem.php:39
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\getSymbol
getSymbol()
Definition:
TopParentItem.php:66
ILIAS\GlobalScreen\Scope\MetaBar\Factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AbstractBaseItem.php:20
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\__construct
__construct(IdentificationInterface $provider_identification)
Definition:
TopParentItem.php:46
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isParent
Interface isParent.
Definition:
isParent.php:26
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\appendChild
appendChild(isChild $child)
Definition:
TopParentItem.php:120
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isChild
Interface isChild.
Definition:
isChild.php:28
ILIAS\MetaData\Repository\Validation\Data\__construct
__construct(VocabulariesInterface $vocabularies)
Definition:
VocabularyBridge.php:31
IdentificationInterface
TopParentItemRenderer
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\$title
string $title
Definition:
TopParentItem.php:41
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\withChildren
withChildren(array $children)
Definition:
TopParentItem.php:109
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isItem
Class isItem.
Definition:
isItem.php:30
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem
Class BaseItem.
Definition:
TopParentItem.php:31
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasSymbol
Interface hasSymbol.
Definition:
hasSymbol.php:31
ILIAS\Repository\symbol
symbol()
Definition:
trait.GlobalDICGUIServices.php:203
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\hasSymbol
hasSymbol()
Definition:
TopParentItem.php:74
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\getChildren
getChildren()
Definition:
TopParentItem.php:101
ILIAS\GlobalScreen\Scope\MetaBar\Factory\ContentLanguage
trait ContentLanguage
Definition:
ContentLanguage.php:26
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\withSymbol
withSymbol(Symbol $symbol)
Definition:
TopParentItem.php:55
ILIAS\GlobalScreen\Scope\MetaBar\Factory\TopParentItem\getTitle
getTitle()
Definition:
TopParentItem.php:93
src
GlobalScreen
Scope
MetaBar
Factory
TopParentItem.php
Generated on Wed Sep 10 2025 14:12:06 for ILIAS by
1.8.13 (using
Doxyfile
)