ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
AbstractChildItem.php
Go to the documentation of this file.
2 
4 
10 abstract 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 
43  public function getParent() : IdentificationInterface
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 }
overrideParent(IdentificationInterface $identification)
withParent(IdentificationInterface $identification)