ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LSItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
24 class LSItem
25 {
26  protected string $type;
27  protected string $title;
28  protected string $description;
29  protected string $icon_path;
30  protected bool $is_online;
31  protected int $order_number;
33  protected int $ref_id;
34  protected int $lp_mode;
35 
36  public function __construct(
37  string $type,
38  string $title,
39  string $description,
40  string $icon_path,
41  bool $is_online,
42  int $order_number,
43  ilLSPostCondition $post_condition,
44  int $ref_id,
45  int $lp_mode
46  ) {
47  $this->type = $type;
48  $this->title = $title;
49  $this->description = $description;
50  $this->icon_path = $icon_path;
51  $this->is_online = $is_online;
52  $this->order_number = $order_number;
53  $this->post_condition = $post_condition;
54  $this->ref_id = $ref_id;
55  $this->lp_mode = $lp_mode;
56  }
57 
58  public function getType(): string
59  {
60  return $this->type;
61  }
62 
63  public function getTitle(): string
64  {
65  return $this->title;
66  }
67 
68  public function getDescription(): string
69  {
70  return $this->description;
71  }
72 
73  public function getIconPath(): string
74  {
75  return $this->icon_path;
76  }
77 
78  public function isOnline(): bool
79  {
80  return $this->is_online;
81  }
82 
83  public function getOrderNumber(): int
84  {
85  return $this->order_number;
86  }
87 
89  {
90  return $this->post_condition;
91  }
92 
93  public function getRefId(): int
94  {
95  return $this->ref_id;
96  }
97 
98  public function getLPMode(): int
99  {
100  return $this->lp_mode;
101  }
102 
103  public function withOnline(bool $online): LSItem
104  {
105  $clone = clone $this;
106  $clone->is_online = $online;
107  return $clone;
108  }
109 
110  public function withOrderNumber(int $order_number): LSItem
111  {
112  $clone = clone $this;
113  $clone->order_number = $order_number;
114  return $clone;
115  }
116 
117  public function withPostCondition(ilLSPostCondition $post_condition): LSItem
118  {
119  $clone = clone $this;
120  $clone->post_condition = $post_condition;
121  return $clone;
122  }
123 }
string $type
Definition: LSItem.php:26
getTitle()
Definition: LSItem.php:63
ilLSPostCondition $post_condition
Definition: LSItem.php:32
getLPMode()
Definition: LSItem.php:98
getOrderNumber()
Definition: LSItem.php:83
getPostCondition()
Definition: LSItem.php:88
string $icon_path
Definition: LSItem.php:29
getDescription()
Definition: LSItem.php:68
int $order_number
Definition: LSItem.php:31
getRefId()
Definition: LSItem.php:93
withOrderNumber(int $order_number)
Definition: LSItem.php:110
bool $is_online
Definition: LSItem.php:30
string $description
Definition: LSItem.php:28
string $title
Definition: LSItem.php:27
getIconPath()
Definition: LSItem.php:73
isOnline()
Definition: LSItem.php:78
Data holding class LSItem .
Definition: LSItem.php:24
__construct(string $type, string $title, string $description, string $icon_path, bool $is_online, int $order_number, ilLSPostCondition $post_condition, int $ref_id, int $lp_mode)
Definition: LSItem.php:36
withPostCondition(ilLSPostCondition $post_condition)
Definition: LSItem.php:117
int $lp_mode
Definition: LSItem.php:34
A PostCondition does restrict the progression of a user through the learning sequence.
withOnline(bool $online)
Definition: LSItem.php:103
int $ref_id
Definition: LSItem.php:33
getType()
Definition: LSItem.php:58