ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ 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
s
t
w
+
Functions
_
a
b
c
f
g
h
i
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
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
2
7
abstract
class
AbstractParentItem
extends
AbstractBaseItem
implements
isParent
8
{
9
13
protected
$children
= [];
14
18
public
function
getChildren
() : array
19
{
20
return
$this->children
;
21
}
22
26
public
function
withChildren
(array
$children
) :
isParent
27
{
28
$clone = clone($this);
29
$clone->children =
$children
;
30
31
return
$clone;
32
}
33
37
public
function
appendChild
(
isChild
$child) :
isParent
38
{
39
$this->children[] = $child;
40
41
return
$this;
42
}
43
47
public
function
hasChildren
() : bool
48
{
49
return
(count($this->children) > 0);
50
}
51
55
public
function
removeChild
(
isChild
$child_to_remove) :
isParent
56
{
57
$this->children = array_filter($this->children,
static
function
(
isItem
$item) use ($child_to_remove) :
bool
{
58
return
$item !== $child_to_remove;
59
});
60
61
return
$this;
62
}
63
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\withChildren
withChildren(array $children)
Definition:
AbstractParentItem.php:26
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\appendChild
appendChild(isChild $child)
Definition:
AbstractParentItem.php:37
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Class AbstractBaseItem.
Definition:
AbstractBaseItem.php:13
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
Interface IFactory.
Definition:
isItem.php:11
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isParent
Interface isParent.
Definition:
isParent.php:7
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild
Interface isChild.
Definition:
isChild.php:9
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\$children
$children
Definition:
AbstractParentItem.php:13
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\getChildren
getChildren()
Definition:
AbstractParentItem.php:18
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem
Class AbstractParentItem.
Definition:
AbstractParentItem.php:7
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:1
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\removeChild
removeChild(isChild $child_to_remove)
Definition:
AbstractParentItem.php:55
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\hasChildren
hasChildren()
Definition:
AbstractParentItem.php:47
src
GlobalScreen
Scope
MainMenu
Factory
AbstractParentItem.php
Generated on Sun Apr 6 2025 20:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)