ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
AbstractChildItem.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
23
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
24
use
ILIAS\GlobalScreen\Identification\NullIdentification
;
25
30
abstract
class
AbstractChildItem
extends
AbstractBaseItem
31
{
32
protected
?
IdentificationInterface
$parent
=
null
;
33
37
public
function
withParent
(
IdentificationInterface
$identification): self
38
{
39
$clone = clone($this);
40
$clone->parent = $identification;
41
42
return
$clone;
43
}
44
48
public
function
hasParent
(): bool
49
{
50
return
$this->parent instanceof
IdentificationInterface
;
51
}
52
56
public
function
getParent
():
IdentificationInterface
57
{
58
return
$this->parent instanceof
IdentificationInterface
? $this->parent :
new
NullIdentification
();
59
}
60
61
public
function
overrideParent
(
IdentificationInterface
$identification):
isItem
62
{
63
$this->parent = $identification;
64
65
return
$this;
66
}
67
}
ILIAS\GlobalScreen\Identification\NullIdentification
Class NullIdentification.
Definition:
NullIdentification.php:28
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Definition:
AbstractBaseItem.php:35
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
Class AbstractBaseItem.
Definition:
AbstractChildItem.php:31
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\withParent
withParent(IdentificationInterface $identification)
@inheritDoc
Definition:
AbstractChildItem.php:37
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\overrideParent
overrideParent(IdentificationInterface $identification)
Definition:
AbstractChildItem.php:61
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\hasParent
hasParent()
@inheritDoc
Definition:
AbstractChildItem.php:48
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\getParent
getParent()
@inheritDoc
Definition:
AbstractChildItem.php:56
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\$parent
IdentificationInterface $parent
Definition:
AbstractChildItem.php:32
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:30
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
Interface IFactory.
Definition:
isItem.php:32
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:21
components
ILIAS
GlobalScreen
src
Scope
MainMenu
Factory
AbstractChildItem.php
Generated on Sat Oct 18 2025 23:03:07 for ILIAS by
1.9.4 (using
Doxyfile
)