ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
AbstractChildItem.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
21
22
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
23
use
ILIAS\GlobalScreen\Identification\NullIdentification
;
24
29
abstract
class
AbstractChildItem
extends
AbstractBaseItem
30
{
31
protected
?
IdentificationInterface
$parent
= null;
32
36
public
function
withParent
(
IdentificationInterface
$identification): self
37
{
38
$clone = clone($this);
39
$clone->parent = $identification;
40
41
return
$clone;
42
}
43
47
public
function
hasParent
(): bool
48
{
49
return
$this->parent instanceof
IdentificationInterface
;
50
}
51
55
public
function
getParent
():
IdentificationInterface
56
{
57
return
$this->parent instanceof
IdentificationInterface
? $this->parent :
new
NullIdentification
();
58
}
59
60
public
function
overrideParent
(
IdentificationInterface
$identification):
isItem
61
{
62
$this->parent = $identification;
63
64
return
$this;
65
}
66
}
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:29
ILIAS\GlobalScreen\Identification\NullIdentification
Class NullIdentification.
Definition:
NullIdentification.php:27
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Class AbstractBaseItem.
Definition:
AbstractBaseItem.php:34
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
Interface IFactory.
Definition:
isItem.php:31
NullIdentification
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\getParent
getParent()
Definition:
AbstractChildItem.php:55
IdentificationInterface
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\$parent
IdentificationInterface $parent
Definition:
AbstractChildItem.php:31
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\withParent
withParent(IdentificationInterface $identification)
Definition:
AbstractChildItem.php:36
ILIAS\GlobalScreen\Scope\MainMenu\Factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AbstractBaseItem.php:21
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\hasParent
hasParent()
Definition:
AbstractChildItem.php:47
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
Class AbstractBaseItem.
Definition:
AbstractChildItem.php:29
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\overrideParent
overrideParent(IdentificationInterface $identification)
Definition:
AbstractChildItem.php:60
src
GlobalScreen
Scope
MainMenu
Factory
AbstractChildItem.php
Generated on Sun Aug 31 2025 22:02:45 for ILIAS by
1.8.13 (using
Doxyfile
)