ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LSItem.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
11class LSItem
12{
16 protected $type;
17
21 protected $title;
22
26 protected $description;
27
31 protected $icon_path;
32
36 protected $is_online;
37
41 protected $order_number;
42
46 protected $post_condition;
47
51 protected $ref_id;
52
53 public function __construct(
54 string $type,
55 string $title,
56 string $description,
57 string $icon_path,
58 bool $is_online,
59 int $order_number,
61 int $ref_id
62 ) {
63 $this->type = $type;
64 $this->title = $title;
65 $this->description = $description;
66 $this->icon_path = $icon_path;
67 $this->is_online = $is_online;
68 $this->order_number = $order_number;
69 $this->post_condition = $post_condition;
70 $this->ref_id = $ref_id;
71 }
72
73 public function getType() : string
74 {
75 return $this->type;
76 }
77
78 public function getTitle() : string
79 {
80 return $this->title;
81 }
82
83 public function getDescription() : string
84 {
85 return $this->description;
86 }
87
88 public function getIconPath() : string
89 {
90 return $this->icon_path;
91 }
92
93 public function isOnline() : bool
94 {
95 return $this->is_online;
96 }
97
98 public function withOnline(bool $online) : LSItem
99 {
100 $clone = clone $this;
101 $clone->is_online = $online;
102 return $clone;
103 }
104
105 public function getOrderNumber() : int
106 {
107 return $this->order_number;
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
118 {
120 }
121
122 public function withPostCondition(ilLSPostCondition $postcondition) : LSItem
123 {
124 $clone = clone $this;
125 $clone->post_condition = $postcondition;
126 return $clone;
127 }
128
129 public function getRefId() : int
130 {
131 return $this->ref_id;
132 }
133}
An exception for terminatinating execution or to throw for unit testing.
Data holding class LSItem .
Definition: LSItem.php:12
$title
Definition: LSItem.php:21
__construct(string $type, string $title, string $description, string $icon_path, bool $is_online, int $order_number, \ilLSPostCondition $post_condition, int $ref_id)
Definition: LSItem.php:53
$post_condition
Definition: LSItem.php:46
getRefId()
Definition: LSItem.php:129
withPostCondition(ilLSPostCondition $postcondition)
Definition: LSItem.php:122
$ref_id
Definition: LSItem.php:51
getIconPath()
Definition: LSItem.php:88
getOrderNumber()
Definition: LSItem.php:105
$order_number
Definition: LSItem.php:41
getType()
Definition: LSItem.php:73
getDescription()
Definition: LSItem.php:83
$description
Definition: LSItem.php:26
$type
Definition: LSItem.php:16
withOrderNumber(int $order_number)
Definition: LSItem.php:110
$is_online
Definition: LSItem.php:36
getTitle()
Definition: LSItem.php:78
withOnline(bool $online)
Definition: LSItem.php:98
getPostCondition()
Definition: LSItem.php:117
$icon_path
Definition: LSItem.php:31
isOnline()
Definition: LSItem.php:93
A PostCondition does restrict the progression of a user through the learning sequence.