ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
canHaveParentTrait.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\Footer\Factory
;
22
23
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
24
28
trait
canHaveParentTrait
29
{
30
protected
?
IdentificationInterface
$parent =
null
;
31
32
public
function
hasParent
(): bool
33
{
34
return
$this->parent !==
null
;
35
}
36
37
public
function
getParentIdentification
(): ?
IdentificationInterface
38
{
39
return
$this->parent;
40
}
41
42
public
function
withParent
(
IdentificationInterface
$identification): self
43
{
44
if
($this->parent !==
null
&& $this->parent === $identification) {
45
return
$this;
46
}
47
48
$clone = clone $this;
49
$clone->parent = $identification;
50
return
$clone;
51
}
52
}
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:30
ILIAS\GlobalScreen\Scope\Footer\Factory
Definition:
AbstractBaseItem.php:21
ILIAS\GlobalScreen\Scope\Footer\Factory\getParentIdentification
getParentIdentification()
Definition:
canHaveParentTrait.php:37
ILIAS\GlobalScreen\Scope\Footer\Factory\withParent
withParent(IdentificationInterface $identification)
Definition:
canHaveParentTrait.php:42
ILIAS\GlobalScreen\Scope\Footer\Factory\hasParent
hasParent()
Definition:
canHaveParentTrait.php:32
ILIAS\GlobalScreen\Scope\Footer\Factory\canHaveParentTrait
trait canHaveParentTrait
Definition:
canHaveParentTrait.php:29
components
ILIAS
GlobalScreen
src
Scope
Footer
Factory
canHaveParentTrait.php
Generated on Sat Oct 18 2025 23:03:06 for ILIAS by
1.9.4 (using
Doxyfile
)