|
1
|
|
|
<?php |
|
2
|
|
|
namespace OmnideskBundle\Request\Cases; |
|
3
|
|
|
|
|
4
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
5
|
|
|
use OmnideskBundle\Request\RequestInterface; |
|
6
|
|
|
use Symfony\Component\HttpFoundation\File\File; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* Class AddCasesRequest |
|
10
|
|
|
* @package OmnideskBundle\Request\Cases |
|
11
|
|
|
*/ |
|
12
|
|
|
class AddCasesRequest implements RequestInterface |
|
13
|
|
|
{ |
|
14
|
|
|
/** |
|
15
|
|
|
* @var string |
|
16
|
|
|
*/ |
|
17
|
|
|
private $userEmail; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @var string |
|
21
|
|
|
*/ |
|
22
|
|
|
private $userPhone; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @var string |
|
26
|
|
|
*/ |
|
27
|
|
|
private $userFullName; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @var string |
|
31
|
|
|
*/ |
|
32
|
|
|
private $subject; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @var string |
|
36
|
|
|
*/ |
|
37
|
|
|
private $content; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @var string |
|
41
|
|
|
*/ |
|
42
|
|
|
private $contentHtml; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @var integer |
|
46
|
|
|
*/ |
|
47
|
|
|
private $groupId; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @var integer |
|
51
|
|
|
*/ |
|
52
|
|
|
private $languageId; |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @var array |
|
56
|
|
|
*/ |
|
57
|
|
|
private $customFields; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @var array |
|
61
|
|
|
*/ |
|
62
|
|
|
private $labels; |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @var string |
|
66
|
|
|
*/ |
|
67
|
|
|
private $priority; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @var ArrayCollection|File[] |
|
71
|
|
|
*/ |
|
72
|
|
|
private $attachments; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* @var integer |
|
76
|
|
|
*/ |
|
77
|
|
|
private $staffId; |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* AddCasesRequest constructor. |
|
81
|
|
|
*/ |
|
82
|
|
|
public function __construct() |
|
83
|
|
|
{ |
|
84
|
|
|
$this->attachments = new ArrayCollection(); |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @return string |
|
89
|
|
|
*/ |
|
90
|
|
|
public function getUserEmail() |
|
91
|
|
|
{ |
|
92
|
|
|
return $this->userEmail; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @param string $userEmail |
|
97
|
|
|
* @return $this |
|
98
|
|
|
*/ |
|
99
|
|
|
public function setUserEmail($userEmail) |
|
100
|
|
|
{ |
|
101
|
|
|
$this->userEmail = $userEmail; |
|
102
|
|
|
|
|
103
|
|
|
return $this; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* @return string |
|
108
|
|
|
*/ |
|
109
|
|
|
public function getUserPhone() |
|
110
|
|
|
{ |
|
111
|
|
|
return $this->userPhone; |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* @param string $userPhone |
|
116
|
|
|
* @return $this |
|
117
|
|
|
*/ |
|
118
|
|
|
public function setUserPhone($userPhone) |
|
119
|
|
|
{ |
|
120
|
|
|
$this->userPhone = $userPhone; |
|
121
|
|
|
|
|
122
|
|
|
return $this; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* @return string |
|
127
|
|
|
*/ |
|
128
|
|
|
public function getUserFullName() |
|
129
|
|
|
{ |
|
130
|
|
|
return $this->userFullName; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* @param string $userFullName |
|
135
|
|
|
* @return $this |
|
136
|
|
|
*/ |
|
137
|
|
|
public function setUserFullName($userFullName) |
|
138
|
|
|
{ |
|
139
|
|
|
$this->userFullName = $userFullName; |
|
140
|
|
|
|
|
141
|
|
|
return $this; |
|
142
|
|
|
} |
|
143
|
|
|
|
|
144
|
|
|
/** |
|
145
|
|
|
* @return string |
|
146
|
|
|
*/ |
|
147
|
|
|
public function getSubject() |
|
148
|
|
|
{ |
|
149
|
|
|
return $this->subject; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* @param string $subject |
|
154
|
|
|
* @return $this |
|
155
|
|
|
*/ |
|
156
|
|
|
public function setSubject($subject) |
|
157
|
|
|
{ |
|
158
|
|
|
$this->subject = $subject; |
|
159
|
|
|
|
|
160
|
|
|
return $this; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* @return string |
|
165
|
|
|
*/ |
|
166
|
|
|
public function getContent() |
|
167
|
|
|
{ |
|
168
|
|
|
return $this->content; |
|
169
|
|
|
} |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* @param string $content |
|
173
|
|
|
* @return $this |
|
174
|
|
|
*/ |
|
175
|
|
|
public function setContent($content) |
|
176
|
|
|
{ |
|
177
|
|
|
$this->content = $content; |
|
178
|
|
|
|
|
179
|
|
|
return $this; |
|
180
|
|
|
} |
|
181
|
|
|
|
|
182
|
|
|
/** |
|
183
|
|
|
* @return string |
|
184
|
|
|
*/ |
|
185
|
|
|
public function getContentHtml() |
|
186
|
|
|
{ |
|
187
|
|
|
return $this->contentHtml; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
/** |
|
191
|
|
|
* @param string $contentHtml |
|
192
|
|
|
* @return $this |
|
193
|
|
|
*/ |
|
194
|
|
|
public function setContentHtml($contentHtml) |
|
195
|
|
|
{ |
|
196
|
|
|
$this->contentHtml = $contentHtml; |
|
197
|
|
|
|
|
198
|
|
|
return $this; |
|
199
|
|
|
} |
|
200
|
|
|
|
|
201
|
|
|
/** |
|
202
|
|
|
* @return int |
|
203
|
|
|
*/ |
|
204
|
|
|
public function getGroupId() |
|
205
|
|
|
{ |
|
206
|
|
|
return $this->groupId; |
|
207
|
|
|
} |
|
208
|
|
|
|
|
209
|
|
|
/** |
|
210
|
|
|
* @param int $groupId |
|
211
|
|
|
* @return $this |
|
212
|
|
|
*/ |
|
213
|
|
|
public function setGroupId($groupId) |
|
214
|
|
|
{ |
|
215
|
|
|
$this->groupId = $groupId; |
|
216
|
|
|
|
|
217
|
|
|
return $this; |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
/** |
|
221
|
|
|
* @return int |
|
222
|
|
|
*/ |
|
223
|
|
|
public function getLanguageId() |
|
224
|
|
|
{ |
|
225
|
|
|
return $this->languageId; |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
/** |
|
229
|
|
|
* @param int $languageId |
|
230
|
|
|
* @return $this |
|
231
|
|
|
*/ |
|
232
|
|
|
public function setLanguageId($languageId) |
|
233
|
|
|
{ |
|
234
|
|
|
$this->languageId = $languageId; |
|
235
|
|
|
|
|
236
|
|
|
return $this; |
|
237
|
|
|
} |
|
238
|
|
|
|
|
239
|
|
|
/** |
|
240
|
|
|
* @return array |
|
241
|
|
|
*/ |
|
242
|
|
|
public function getCustomFields() |
|
243
|
|
|
{ |
|
244
|
|
|
return $this->customFields; |
|
245
|
|
|
} |
|
246
|
|
|
|
|
247
|
|
|
/** |
|
248
|
|
|
* @param array $customFields |
|
249
|
|
|
* @return $this |
|
250
|
|
|
*/ |
|
251
|
|
|
public function setCustomFields($customFields) |
|
252
|
|
|
{ |
|
253
|
|
|
$this->customFields = $customFields; |
|
254
|
|
|
|
|
255
|
|
|
return $this; |
|
256
|
|
|
} |
|
257
|
|
|
|
|
258
|
|
|
/** |
|
259
|
|
|
* @return array |
|
260
|
|
|
*/ |
|
261
|
|
|
public function getLabels() |
|
262
|
|
|
{ |
|
263
|
|
|
return $this->labels; |
|
264
|
|
|
} |
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* @param array $labels |
|
268
|
|
|
* @return $this |
|
269
|
|
|
*/ |
|
270
|
|
|
public function setLabels($labels) |
|
271
|
|
|
{ |
|
272
|
|
|
$this->labels = $labels; |
|
273
|
|
|
|
|
274
|
|
|
return $this; |
|
275
|
|
|
} |
|
276
|
|
|
|
|
277
|
|
|
/** |
|
278
|
|
|
* @return ArrayCollection|File[] |
|
279
|
|
|
*/ |
|
280
|
|
|
public function getAttachments() |
|
281
|
|
|
{ |
|
282
|
|
|
return $this->attachments; |
|
283
|
|
|
} |
|
284
|
|
|
|
|
285
|
|
|
/** |
|
286
|
|
|
* @param File $attachment |
|
287
|
|
|
*/ |
|
288
|
|
|
public function addAttachment(File $attachment) |
|
289
|
|
|
{ |
|
290
|
|
|
$this->attachments->add($attachment); |
|
291
|
|
|
} |
|
292
|
|
|
|
|
293
|
|
|
/** |
|
294
|
|
|
* @return string |
|
295
|
|
|
*/ |
|
296
|
|
|
public function getPriority() |
|
297
|
|
|
{ |
|
298
|
|
|
return $this->priority; |
|
299
|
|
|
} |
|
300
|
|
|
|
|
301
|
|
|
/** |
|
302
|
|
|
* @param string $priority |
|
303
|
|
|
* @return $this |
|
304
|
|
|
*/ |
|
305
|
|
|
public function setPriority($priority) |
|
306
|
|
|
{ |
|
307
|
|
|
$this->priority = $priority; |
|
308
|
|
|
|
|
309
|
|
|
return $this; |
|
310
|
|
|
} |
|
311
|
|
|
|
|
312
|
|
|
/** |
|
313
|
|
|
* @return int |
|
314
|
|
|
*/ |
|
315
|
|
|
public function getStaffId() |
|
316
|
|
|
{ |
|
317
|
|
|
return $this->staffId; |
|
318
|
|
|
} |
|
319
|
|
|
|
|
320
|
|
|
/** |
|
321
|
|
|
* @param int $staffId |
|
322
|
|
|
* @return $this |
|
323
|
|
|
*/ |
|
324
|
|
|
public function setStaffId($staffId) |
|
325
|
|
|
{ |
|
326
|
|
|
$this->staffId = $staffId; |
|
327
|
|
|
|
|
328
|
|
|
return $this; |
|
329
|
|
|
} |
|
330
|
|
|
} |
|
331
|
|
|
|