ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
AbstractBaseItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
30 abstract class AbstractBaseItem implements isItem
31 {
34 
35  private int $position = 0;
36  private bool $is_core = false;
37 
38  public function __construct(private IdentificationInterface $provider_identification)
39  {
40  }
41 
42  public function getPosition(): int
43  {
44  return $this->position;
45  }
46 
47  public function withPosition(int $position): isItem
48  {
49  $clone = clone $this;
50  $clone->position = $position;
51  return $clone;
52  }
53 
55  {
56  return $this->provider_identification;
57  }
58 
59  public function isCore(): bool
60  {
61  return $this->is_core;
62  }
63 
64  public function withIsCore(): isItem
65  {
66  $clone = clone $this;
67  $clone->is_core = true;
68  return $clone;
69  }
70 
71 }
__construct(private IdentificationInterface $provider_identification)
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
withIsCore()
Core Items are handled differently, they are not translatable via GUI and use their translations from...