ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilUserStartingPoint.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  private const ROLE_BASED = 2;
24 
25  public function __construct(
26  private ?int $id,
27  private ?int $starting_point_type = null,
28  private int $starting_object = 0,
29  private ?int $starting_position = null,
30  private ?int $rule_type = null,
31  private ?string $rule_options = null, // array serialized in db
32  private int $calendar_view = 0,
33  private int $calendar_period = 0
34  ) {
35  }
36 
37  public function getId(): ?int
38  {
39  return $this->id;
40  }
41 
42  public function setStartingPointType(int $starting_point_type): void
43  {
44  $this->starting_point_type = $starting_point_type;
45  }
46 
47  public function getStartingPointType(): int
48  {
49  return $this->starting_point_type;
50  }
51 
52  public function setStartingObject(int $a_starting_object): void
53  {
54  $this->starting_object = $a_starting_object;
55  }
56 
57  public function getStartingObject(): int
58  {
59  return $this->starting_object;
60  }
61 
62  public function setPosition(int $a_starting_position): void
63  {
64  $this->starting_position = $a_starting_position;
65  }
66 
67  public function getPosition(): int
68  {
69  return $this->starting_position;
70  }
71 
72  public function getRuleType(): ?int
73  {
74  return $this->rule_type;
75  }
76 
77  public function isRoleBasedStartingPoint(): bool
78  {
79  return $this->rule_type === self::ROLE_BASED;
80  }
81 
82  public function setRuleTypeRoleBased(): void
83  {
84  $this->rule_type = self::ROLE_BASED;
85  }
86 
90  public function getCalendarView(): int
91  {
92  return $this->calendar_view;
93  }
94 
98  public function setCalendarView(int $calendar_view): void
99  {
100  $this->calendar_view = $calendar_view;
101  }
102 
103  public function getCalendarPeriod(): int
104  {
105  return $this->calendar_period;
106  }
107 
108  public function setCalendarPeriod(int $calendar_period): void
109  {
110  $this->calendar_period = $calendar_period;
111  }
112 
113  public function getRuleOptions(): ?string
114  {
115  return $this->rule_options;
116  }
117 
118  public function setRuleOptions(string $a_rule_options): void
119  {
120  $this->rule_options = $a_rule_options;
121  }
122 }
setStartingPointType(int $starting_point_type)
setStartingObject(int $a_starting_object)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setCalendarView(int $calendar_view)
Sets calendar view.
$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)
getCalendarView()
Gets calendar view.
setCalendarPeriod(int $calendar_period)
setPosition(int $a_starting_position)
setRuleOptions(string $a_rule_options)