ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
AbstractChildItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
29abstract class AbstractChildItem extends AbstractBaseItem implements isItem, isChild
30{
32
36 public function withParent(IdentificationInterface $identification): isItem
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
56 {
57 return $this->parent;
58 }
59
63 public function overrideParent(IdentificationInterface $identification): isChild
64 {
65 $this->parent = $identification;
66
67 return $this;
68 }
69}
overrideParent(IdentificationInterface $identification)
@inheritDoc
withParent(IdentificationInterface $identification)
@inheritDoc