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
AbstractParentItem.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
21
26
abstract
class
AbstractParentItem
extends
AbstractBaseItem
implements
isParent
27
{
31
protected
$children
= [];
32
36
public
function
getChildren
() : array
37
{
38
return
$this->children
;
39
}
40
44
public
function
withChildren
(array
$children
) :
isParent
45
{
46
$clone = clone($this);
47
$clone->children =
$children
;
48
49
return
$clone;
50
}
51
55
public
function
appendChild
(
isItem
$child) :
isParent
56
{
57
$this->children[] = $child;
58
59
return
$this;
60
}
61
65
public
function
hasChildren
() : bool
66
{
67
return
(count($this->children) > 0);
68
}
69
73
public
function
removeChild
(
isItem
$child_to_remove) :
isParent
74
{
75
$this->children = array_filter($this->children,
static
function
(
isItem
$item) use ($child_to_remove) :
bool
{
76
return
$item !== $child_to_remove;
77
});
78
79
return
$this;
80
}
81
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\withChildren
withChildren(array $children)
Definition:
AbstractParentItem.php:44
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Class 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
$children
Definition:
AbstractParentItem.php:31
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\appendChild
appendChild(isItem $child)
Definition:
AbstractParentItem.php:55
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\getChildren
getChildren()
Definition:
AbstractParentItem.php:36
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem
Class AbstractParentItem.
Definition:
AbstractParentItem.php:26
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\removeChild
removeChild(isItem $child_to_remove)
Definition:
AbstractParentItem.php:73
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:21
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\hasChildren
hasChildren()
Definition:
AbstractParentItem.php:65
src
GlobalScreen
Scope
MainMenu
Factory
AbstractParentItem.php
Generated on Tue Apr 8 2025 21:02:11 for ILIAS by
1.8.13 (using
Doxyfile
)