ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
LSItem.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
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 
35  public function __construct(
36  string $type,
37  string $title,
38  string $description,
39  string $icon_path,
40  bool $is_online,
41  int $order_number,
42  ilLSPostCondition $post_condition,
43  int $ref_id
44  ) {
45  $this->type = $type;
46  $this->title = $title;
47  $this->description = $description;
48  $this->icon_path = $icon_path;
49  $this->is_online = $is_online;
50  $this->order_number = $order_number;
51  $this->post_condition = $post_condition;
52  $this->ref_id = $ref_id;
53  }
54 
55  public function getType(): string
56  {
57  return $this->type;
58  }
59 
60  public function getTitle(): string
61  {
62  return $this->title;
63  }
64 
65  public function getDescription(): string
66  {
67  return $this->description;
68  }
69 
70  public function getIconPath(): string
71  {
72  return $this->icon_path;
73  }
74 
75  public function isOnline(): bool
76  {
77  return $this->is_online;
78  }
79 
80  public function getOrderNumber(): int
81  {
82  return $this->order_number;
83  }
84 
86  {
87  return $this->post_condition;
88  }
89 
90  public function getRefId(): int
91  {
92  return $this->ref_id;
93  }
94 
95  public function withOnline(bool $online): LSItem
96  {
97  $clone = clone $this;
98  $clone->is_online = $online;
99  return $clone;
100  }
101 
102  public function withOrderNumber(int $order_number): LSItem
103  {
104  $clone = clone $this;
105  $clone->order_number = $order_number;
106  return $clone;
107  }
108 
109  public function withPostCondition(ilLSPostCondition $post_condition): LSItem
110  {
111  $clone = clone $this;
112  $clone->post_condition = $post_condition;
113  return $clone;
114  }
115 }
string $type
Definition: LSItem.php:26
getTitle()
Definition: LSItem.php:60
ilLSPostCondition $post_condition
Definition: LSItem.php:32
getOrderNumber()
Definition: LSItem.php:80
getPostCondition()
Definition: LSItem.php:85
string $icon_path
Definition: LSItem.php:29
getDescription()
Definition: LSItem.php:65
int $order_number
Definition: LSItem.php:31
getRefId()
Definition: LSItem.php:90
withOrderNumber(int $order_number)
Definition: LSItem.php:102
bool $is_online
Definition: LSItem.php:30
string $description
Definition: LSItem.php:28
string $title
Definition: LSItem.php:27
getIconPath()
Definition: LSItem.php:70
isOnline()
Definition: LSItem.php:75
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: LSItem.php:24
withPostCondition(ilLSPostCondition $post_condition)
Definition: LSItem.php:109
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
withOnline(bool $online)
Definition: LSItem.php:95
int $ref_id
Definition: LSItem.php:33
__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:35
getType()
Definition: LSItem.php:55