ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
AbstractChildItem.php
Go to the documentation of this file.
1
<?php
2
19
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
{
34
protected
$parent
;
35
39
public
function
withParent
(
IdentificationInterface
$identification) :
isItem
40
{
41
$clone = clone($this);
42
$clone->parent = $identification;
43
44
return
$clone;
45
}
46
50
public
function
hasParent
() : bool
51
{
52
return
$this->parent instanceof
IdentificationInterface
;
53
}
54
58
public
function
getParent
() :
IdentificationInterface
59
{
60
return
$this->parent instanceof
IdentificationInterface
? $this->parent :
new
NullIdentification
();
61
}
62
63
public
function
overrideParent
(
IdentificationInterface
$identification) :
isItem
64
{
65
$this->parent = $identification;
66
67
return
$this;
68
}
69
}
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
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\$parent
$parent
Definition:
AbstractChildItem.php:34
NullIdentification
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\getParent
getParent()
Definition:
AbstractChildItem.php:58
IdentificationInterface
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\withParent
withParent(IdentificationInterface $identification)
Definition:
AbstractChildItem.php:39
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:21
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\hasParent
hasParent()
Definition:
AbstractChildItem.php:50
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:63
src
GlobalScreen
Scope
MainMenu
Factory
AbstractChildItem.php
Generated on Tue Sep 2 2025 21:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)