ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
AbstractChildItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
29 abstract 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)
withParent(IdentificationInterface $identification)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null