ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
AbstractParentItem.php
Go to the documentation of this file.
1
<?
php
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
2
8
abstract
class
AbstractParentItem
extends
AbstractBaseItem
implements
isParent
9
{
10
14
protected
$children
= [];
15
16
20
public
function
getChildren
() : array
21
{
22
return
$this->children
;
23
}
24
25
29
public
function
withChildren
(array
$children
) :
isParent
30
{
31
$clone = clone($this);
32
$clone->children =
$children
;
33
34
return
$clone;
35
}
36
37
41
public
function
appendChild
(
isChild
$child) :
isParent
42
{
43
$this->children[] = $child;
44
45
return
$this;
46
}
47
48
52
public
function
hasChildren
() : bool
53
{
54
return
(count($this->children) > 0);
55
}
56
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\withChildren
withChildren(array $children)
Definition:
AbstractParentItem.php:29
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\appendChild
appendChild(isChild $child)
Definition:
AbstractParentItem.php:41
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Class AbstractBaseItem.
Definition:
AbstractBaseItem.php:12
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isParent
Interface isParent.
Definition:
isParent.php:8
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild
Interface isChild.
Definition:
isChild.php:10
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\$children
$children
Definition:
AbstractParentItem.php:14
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\getChildren
getChildren()
Definition:
AbstractParentItem.php:20
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem
Class AbstractParentItem.
Definition:
AbstractParentItem.php:8
php
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:1
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem\hasChildren
hasChildren()
Definition:
AbstractParentItem.php:52
src
GlobalScreen
Scope
MainMenu
Factory
AbstractParentItem.php
Generated on Thu Jan 16 2025 19:02:37 for ILIAS by
1.8.13 (using
Doxyfile
)