ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
AbstractChildItem.php
Go to the documentation of this file.
1
<?
php
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory
;
2
3
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
4
use
ILIAS\GlobalScreen\Identification\NullIdentification
;
5
11
abstract
class
AbstractChildItem
extends
AbstractBaseItem
implements
isChild
12
{
13
17
protected
$parent
;
18
19
23
public
function
withParent
(
IdentificationInterface
$identification) :
isItem
24
{
25
$clone = clone($this);
26
$clone->parent = $identification;
27
28
return
$clone;
29
}
30
31
35
public
function
hasParent
() : bool
36
{
37
return
($this->
parent
instanceof
IdentificationInterface
);
38
}
39
40
44
public
function
getParent
() :
IdentificationInterface
45
{
46
return
$this->
parent
instanceof
IdentificationInterface
? $this->
parent
:
new
NullIdentification
();
47
}
48
49
53
public
function
overrideParent
(
IdentificationInterface
$identification) :
isChild
54
{
55
$this->
parent
= $identification;
56
57
return
$this;
58
}
59
}
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:8
ILIAS\GlobalScreen\Identification\NullIdentification
Class NullIdentification.
Definition:
NullIdentification.php:8
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractBaseItem
Class AbstractBaseItem.
Definition:
AbstractBaseItem.php:12
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem
Interface IFactory.
Definition:
isItem.php:12
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild
Interface isChild.
Definition:
isChild.php:10
parent
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\$parent
$parent
Definition:
AbstractChildItem.php:17
NullIdentification
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\getParent
getParent()
Definition:
AbstractChildItem.php:44
IdentificationInterface
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\withParent
withParent(IdentificationInterface $identification)
Definition:
AbstractChildItem.php:23
php
ILIAS\GlobalScreen\Scope\MainMenu\Factory
Definition:
AbstractBaseItem.php:1
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\hasParent
hasParent()
Definition:
AbstractChildItem.php:35
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
Class AbstractBaseItem.
Definition:
AbstractChildItem.php:11
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem\overrideParent
overrideParent(IdentificationInterface $identification)
Definition:
AbstractChildItem.php:53
src
GlobalScreen
Scope
MainMenu
Factory
AbstractChildItem.php
Generated on Thu Jan 16 2025 19:02:37 for ILIAS by
1.8.13 (using
Doxyfile
)