ILIAS
trunk Revision v11.0_alpha-1713-gd8962da2f67
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
AbstractParentItem.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
22
27
abstract
class
AbstractParentItem
extends
AbstractBaseItem
implements
isParent
28
{
32
protected
array
$children
= [];
33
37
public
function
getChildren
(): array
38
{
39
return
$this->children
;
40
}
41
45
public
function
withChildren
(array $children):
isParent
46
{
47
$clone = clone($this);
48
$clone->children =
$children
;
49
50
return
$clone;
51
}
52
56
public
function
appendChild
(
isItem
$child):
isParent
57
{
58
$this->children[] = $child;
59
60
return
$this;
61
}
62
66
public
function
hasChildren
(): bool
67
{
68
return
($this->children !== []);
69
}
70
74
public
function
removeChild
(
isItem
$child_to_remove):
isParent
75
{
76
$this->children = array_filter($this->children,
static
fn(
isItem
$item):
bool
=> $item !== $child_to_remove);
77
78
return
$this;
79
}
80
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\withChildren
withChildren(array $children)
Definition:
AbstractParentItem.php:45
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Definition:
AbstractBaseItem.php:34
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
Interface IFactory.
Definition:
isItem.php:31
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isParent
Interface isParent.
Definition:
isParent.php:26
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\$children
array $children
Definition:
AbstractParentItem.php:32
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\appendChild
appendChild(isItem $child)
Definition:
AbstractParentItem.php:56
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\getChildren
getChildren()
Definition:
AbstractParentItem.php:37
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem
Class AbstractParentItem.
Definition:
AbstractParentItem.php:27
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\removeChild
removeChild(isItem $child_to_remove)
Definition:
AbstractParentItem.php:74
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:21
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\hasChildren
hasChildren()
Definition:
AbstractParentItem.php:66
components
ILIAS
GlobalScreen
src
Scope
MainMenu
Factory
AbstractParentItem.php
Generated on Fri Apr 4 2025 23:03:14 for ILIAS by
1.8.13 (using
Doxyfile
)