ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
AbstractBaseItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
30abstract 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()
@description Core Items are handled differently, they are not translatable via GUI and use their tran...