|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
|
4
|
|
|
|
|
5
|
|
|
declare(strict_types=1); |
|
6
|
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Dto; |
|
8
|
|
|
|
|
9
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
10
|
|
|
use Symfony\Component\Serializer\Annotation\Groups; |
|
11
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
12
|
|
|
|
|
13
|
|
|
#[ApiResource( |
|
14
|
|
|
normalizationContext: ['groups' => ['read']], |
|
15
|
|
|
denormalizationContext: ['groups' => ['write']], |
|
16
|
|
|
)] |
|
17
|
|
|
class CreateSessionWithUsersAndCoursesInput |
|
18
|
|
|
{ |
|
19
|
|
|
#[Assert\NotBlank] |
|
20
|
|
|
#[Groups(['write'])] |
|
21
|
|
|
private string $title; |
|
22
|
|
|
|
|
23
|
|
|
#[Groups(['write'])] |
|
24
|
|
|
private ?string $description = null; |
|
25
|
|
|
|
|
26
|
|
|
#[Groups(['write'])] |
|
27
|
|
|
private ?bool $showDescription = true; |
|
28
|
|
|
|
|
29
|
|
|
#[Groups(['write'])] |
|
30
|
|
|
private ?int $duration = 0; |
|
31
|
|
|
|
|
32
|
|
|
#[Groups(['write'])] |
|
33
|
|
|
private ?\DateTime $displayStartDate = null; |
|
34
|
|
|
|
|
35
|
|
|
#[Groups(['write'])] |
|
36
|
|
|
private ?\DateTime $displayEndDate = null; |
|
37
|
|
|
|
|
38
|
|
|
#[Groups(['write'])] |
|
39
|
|
|
private ?\DateTime $accessStartDate = null; |
|
40
|
|
|
|
|
41
|
|
|
#[Groups(['write'])] |
|
42
|
|
|
private ?\DateTime $accessEndDate = null; |
|
43
|
|
|
|
|
44
|
|
|
#[Groups(['write'])] |
|
45
|
|
|
private ?\DateTime $coachAccessStartDate = null; |
|
46
|
|
|
|
|
47
|
|
|
#[Groups(['write'])] |
|
48
|
|
|
private ?\DateTime $coachAccessEndDate = null; |
|
49
|
|
|
|
|
50
|
|
|
#[Groups(['write'])] |
|
51
|
|
|
private ?int $category = null; |
|
52
|
|
|
|
|
53
|
|
|
#[Groups(['write'])] |
|
54
|
|
|
private ?int $validityInDays = 0; |
|
55
|
|
|
|
|
56
|
|
|
#[Groups(['write'])] |
|
57
|
|
|
private ?int $visibility = 1; |
|
58
|
|
|
|
|
59
|
|
|
#[Groups(['write'])] |
|
60
|
|
|
private array $courseIds = []; |
|
61
|
|
|
|
|
62
|
|
|
#[Groups(['write'])] |
|
63
|
|
|
private array $studentIds = []; |
|
64
|
|
|
|
|
65
|
|
|
#[Groups(['write'])] |
|
66
|
|
|
private array $tutorIds = []; |
|
67
|
|
|
|
|
68
|
|
|
public function getTitle(): string |
|
69
|
|
|
{ |
|
70
|
|
|
return $this->title; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
public function setTitle(string $title): void |
|
74
|
|
|
{ |
|
75
|
|
|
$this->title = $title; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
public function getDescription(): ?string |
|
79
|
|
|
{ |
|
80
|
|
|
return $this->description; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
public function setDescription(?string $description): void |
|
84
|
|
|
{ |
|
85
|
|
|
$this->description = $description; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
public function getShowDescription(): ?bool |
|
89
|
|
|
{ |
|
90
|
|
|
return $this->showDescription; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
public function setShowDescription(?bool $showDescription): void |
|
94
|
|
|
{ |
|
95
|
|
|
$this->showDescription = $showDescription; |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
public function getDuration(): ?int |
|
99
|
|
|
{ |
|
100
|
|
|
return $this->duration; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
public function setDuration(?int $duration): void |
|
104
|
|
|
{ |
|
105
|
|
|
$this->duration = $duration; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
public function getDisplayStartDate(): ?\DateTime |
|
109
|
|
|
{ |
|
110
|
|
|
return $this->displayStartDate; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
public function setDisplayStartDate(?\DateTime $displayStartDate): void |
|
114
|
|
|
{ |
|
115
|
|
|
$this->displayStartDate = $displayStartDate; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function getDisplayEndDate(): ?\DateTime |
|
119
|
|
|
{ |
|
120
|
|
|
return $this->displayEndDate; |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
public function setDisplayEndDate(?\DateTime $displayEndDate): void |
|
124
|
|
|
{ |
|
125
|
|
|
$this->displayEndDate = $displayEndDate; |
|
126
|
|
|
} |
|
127
|
|
|
|
|
128
|
|
|
public function getAccessStartDate(): ?\DateTime |
|
129
|
|
|
{ |
|
130
|
|
|
return $this->accessStartDate; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
public function setAccessStartDate(?\DateTime $accessStartDate): void |
|
134
|
|
|
{ |
|
135
|
|
|
$this->accessStartDate = $accessStartDate; |
|
136
|
|
|
} |
|
137
|
|
|
|
|
138
|
|
|
public function getAccessEndDate(): ?\DateTime |
|
139
|
|
|
{ |
|
140
|
|
|
return $this->accessEndDate; |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
public function setAccessEndDate(?\DateTime $accessEndDate): void |
|
144
|
|
|
{ |
|
145
|
|
|
$this->accessEndDate = $accessEndDate; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
public function getCoachAccessStartDate(): ?\DateTime |
|
149
|
|
|
{ |
|
150
|
|
|
return $this->coachAccessStartDate; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
public function setCoachAccessStartDate(?\DateTime $coachAccessStartDate): void |
|
154
|
|
|
{ |
|
155
|
|
|
$this->coachAccessStartDate = $coachAccessStartDate; |
|
156
|
|
|
} |
|
157
|
|
|
|
|
158
|
|
|
public function getCoachAccessEndDate(): ?\DateTime |
|
159
|
|
|
{ |
|
160
|
|
|
return $this->coachAccessEndDate; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
public function setCoachAccessEndDate(?\DateTime $coachAccessEndDate): void |
|
164
|
|
|
{ |
|
165
|
|
|
$this->coachAccessEndDate = $coachAccessEndDate; |
|
166
|
|
|
} |
|
167
|
|
|
|
|
168
|
|
|
public function getCategory(): ?int |
|
169
|
|
|
{ |
|
170
|
|
|
return $this->category; |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
public function setCategory(?int $category): void |
|
174
|
|
|
{ |
|
175
|
|
|
$this->category = $category; |
|
176
|
|
|
} |
|
177
|
|
|
|
|
178
|
|
|
public function getValidityInDays(): ?int |
|
179
|
|
|
{ |
|
180
|
|
|
return $this->validityInDays; |
|
181
|
|
|
} |
|
182
|
|
|
|
|
183
|
|
|
public function setValidityInDays(?int $validityInDays): void |
|
184
|
|
|
{ |
|
185
|
|
|
$this->validityInDays = $validityInDays; |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
public function getVisibility(): ?int |
|
189
|
|
|
{ |
|
190
|
|
|
return $this->visibility; |
|
191
|
|
|
} |
|
192
|
|
|
|
|
193
|
|
|
public function setVisibility(?int $visibility): void |
|
194
|
|
|
{ |
|
195
|
|
|
$this->visibility = $visibility; |
|
196
|
|
|
} |
|
197
|
|
|
|
|
198
|
|
|
public function getCourseIds(): array |
|
199
|
|
|
{ |
|
200
|
|
|
return $this->courseIds; |
|
201
|
|
|
} |
|
202
|
|
|
|
|
203
|
|
|
public function setCourseIds(array $courseIds): void |
|
204
|
|
|
{ |
|
205
|
|
|
$this->courseIds = $courseIds; |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
public function getStudentIds(): array |
|
209
|
|
|
{ |
|
210
|
|
|
return $this->studentIds; |
|
211
|
|
|
} |
|
212
|
|
|
|
|
213
|
|
|
public function setStudentIds(array $studentIds): void |
|
214
|
|
|
{ |
|
215
|
|
|
$this->studentIds = $studentIds; |
|
216
|
|
|
} |
|
217
|
|
|
|
|
218
|
|
|
public function getTutorIds(): array |
|
219
|
|
|
{ |
|
220
|
|
|
return $this->tutorIds; |
|
221
|
|
|
} |
|
222
|
|
|
|
|
223
|
|
|
public function setTutorIds(array $tutorIds): void |
|
224
|
|
|
{ |
|
225
|
|
|
$this->tutorIds = $tutorIds; |
|
226
|
|
|
} |
|
227
|
|
|
} |
|
228
|
|
|
|