ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StartingPoint.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 private const ROLE_BASED = 2;
26
27 public function __construct(
28 private ?int $id,
29 private ?int $starting_point_type = null,
30 private int $starting_object = 0,
31 private ?int $starting_position = null,
32 private ?int $rule_type = null,
33 private ?string $rule_options = null, // array serialized in db
34 private int $calendar_view = 0,
35 private int $calendar_period = 0
36 ) {
37 }
38
39 public function getId(): ?int
40 {
41 return $this->id;
42 }
43
44 public function setStartingPointType(int $starting_point_type): void
45 {
46 $this->starting_point_type = $starting_point_type;
47 }
48
49 public function getStartingPointType(): int
50 {
51 return $this->starting_point_type;
52 }
53
54 public function setStartingObject(int $a_starting_object): void
55 {
56 $this->starting_object = $a_starting_object;
57 }
58
59 public function getStartingObject(): int
60 {
61 return $this->starting_object;
62 }
63
64 public function setPosition(int $a_starting_position): void
65 {
66 $this->starting_position = $a_starting_position;
67 }
68
69 public function getPosition(): int
70 {
71 return $this->starting_position;
72 }
73
74 public function getRuleType(): ?int
75 {
76 return $this->rule_type;
77 }
78
79 public function isRoleBasedStartingPoint(): bool
80 {
81 return $this->rule_type === self::ROLE_BASED;
82 }
83
84 public function setRuleTypeRoleBased(): void
85 {
86 $this->rule_type = self::ROLE_BASED;
87 }
88
92 public function getCalendarView(): int
93 {
94 return $this->calendar_view;
95 }
96
100 public function setCalendarView(int $calendar_view): void
101 {
102 $this->calendar_view = $calendar_view;
103 }
104
105 public function getCalendarPeriod(): int
106 {
107 return $this->calendar_period;
108 }
109
110 public function setCalendarPeriod(int $calendar_period): void
111 {
112 $this->calendar_period = $calendar_period;
113 }
114
115 public function getRuleOptions(): ?string
116 {
117 return $this->rule_options;
118 }
119
120 public function setRuleOptions(string $a_rule_options): void
121 {
122 $this->rule_options = $a_rule_options;
123 }
124}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
__construct(private ?int $id, private ?int $starting_point_type=null, private int $starting_object=0, private ?int $starting_position=null, private ?int $rule_type=null, private ?string $rule_options=null, private int $calendar_view=0, private int $calendar_period=0)
setCalendarView(int $calendar_view)
Sets calendar view.