ILIAS  release_7 Revision v7.30-3-g800a261c036
TopParentItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
32{
34
38 protected $children = [];
42 protected $symbol;
46 protected $title = "";
47
52 {
54 $this->renderer = new TopParentItemRenderer();
55 }
56
61 {
62 $clone = clone($this);
63 $clone->symbol = $symbol;
64
65 return $clone;
66 }
67
71 public function getSymbol() : Symbol
72 {
73 return $this->symbol;
74 }
75
79 public function hasSymbol() : bool
80 {
81 return ($this->symbol instanceof Symbol);
82 }
83
87 public function withTitle(string $title) : hasTitle
88 {
89 $clone = clone($this);
90 $clone->title = $title;
91
92 return $clone;
93 }
94
98 public function getTitle() : string
99 {
100 return $this->title;
101 }
102
106 public function getChildren() : array
107 {
108 return $this->children;
109 }
110
114 public function withChildren(array $children) : isParent
115 {
116 $clone = clone($this);
117 $clone->children = $children;
118
119 return $clone;
120 }
121
125 public function appendChild(isChild $child) : isParent
126 {
127 $this->children[] = $child;
128
129 return $this;
130 }
131
135 public function hasChildren() : bool
136 {
137 return $this->children !== [];
138 }
139}
An exception for terminatinating execution or to throw for unit testing.
__construct(IdentificationInterface $provider_identification)
@inheritDoc
This describes a symbol.
Definition: Symbol.php:12
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc