ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
AbstractChildItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
21 
24 
29 abstract class AbstractChildItem extends AbstractBaseItem
30 {
32 
36  public function withParent(IdentificationInterface $identification): self
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 instanceof IdentificationInterface ? $this->parent : new NullIdentification();
58  }
59 
60  public function overrideParent(IdentificationInterface $identification): isItem
61  {
62  $this->parent = $identification;
63 
64  return $this;
65  }
66 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withParent(IdentificationInterface $identification)
overrideParent(IdentificationInterface $identification)