ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilLearningSequenceSettings.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
11{
12
16 protected $obj_id;
17
21 protected $abstract;
22
26 protected $extro;
27
31 protected $abstract_image;
32
36 protected $extro_image;
37
41 protected $uploads = [];
42
46 protected $deletions = [];
47
52
53
54 public function __construct(
55 int $obj_id,
56 string $abstract = '',
57 string $extro = '',
58 string $abstract_image = null,
59 string $extro_image = null,
60 bool $members_gallery = false
61 ) {
62 $this->obj_id = $obj_id;
63 $this->abstract = $abstract;
64 $this->extro = $extro;
65 $this->abstract_image = $abstract_image;
66 $this->extro_image = $extro_image;
67 $this->members_gallery = $members_gallery;
68 }
69
70 public function getObjId() : int
71 {
72 return $this->obj_id;
73 }
74
75 public function getAbstract() : string
76 {
77 return $this->abstract;
78 }
79
81 {
82 $clone = clone $this;
83 $clone->abstract = $abstract;
84 return $clone;
85 }
86
87 public function getExtro() : string
88 {
89 return $this->extro;
90 }
91
93 {
94 $clone = clone $this;
95 $clone->extro = $extro;
96 return $clone;
97 }
98
99 public function getAbstractImage()
100 {
102 }
103
104 public function withAbstractImage(string $path = null) : ilLearningSequenceSettings
105 {
106 $clone = clone $this;
107 $clone->abstract_image = $path;
108 return $clone;
109 }
110
111 public function getExtroImage()
112 {
113 return $this->extro_image;
114 }
115
116 public function withExtroImage(string $path = null) : ilLearningSequenceSettings
117 {
118 $clone = clone $this;
119 $clone->extro_image = $path;
120 return $clone;
121 }
122
123 public function getUploads() : array
124 {
125 return $this->uploads;
126 }
127
128 public function withUpload(array $upload_info, string $which) : ilLearningSequenceSettings
129 {
130 $clone = clone $this;
131 $clone->uploads[$which] = $upload_info;
132 return $clone;
133 }
134
135 public function getDeletions() : array
136 {
137 return $this->deletions;
138 }
139
140 public function withDeletion(string $which) : ilLearningSequenceSettings
141 {
142 $clone = clone $this;
143 $clone->deletions[] = $which;
144 return $clone;
145 }
146
147 public function getMembersGallery() : bool
148 {
150 }
151
153 {
154 $clone = clone $this;
155 $clone->members_gallery = $members_gallery;
156 return $clone;
157 }
158}
An exception for terminatinating execution or to throw for unit testing.
Settings for an LSO (like abstract, extro)
withUpload(array $upload_info, string $which)
__construct(int $obj_id, string $abstract='', string $extro='', string $abstract_image=null, string $extro_image=null, bool $members_gallery=false)