ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
AbstractChildItem.php
Go to the documentation of this file.
2
4
10abstract class AbstractChildItem extends AbstractBaseItem implements isItem, isChild
11{
12
16 protected $parent;
17
18
22 public function withParent(IdentificationInterface $identification) : isItem
23 {
24 $clone = clone $this;
25 $clone->parent = $identification;
26
27 return $clone;
28 }
29
30
34 public function hasParent() : bool
35 {
36 return ($this->parent instanceof IdentificationInterface);
37 }
38
39
44 {
45 return $this->parent;
46 }
47
48
52 public function overrideParent(IdentificationInterface $identification) : isChild
53 {
54 $this->parent = $identification;
55
56 return $this;
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
overrideParent(IdentificationInterface $identification)
@inheritDoc
withParent(IdentificationInterface $identification)
@inheritDoc