1
|
|
|
<?php |
2
|
|
|
namespace OmnideskBundle\Request\Message; |
3
|
|
|
|
4
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
5
|
|
|
use OmnideskBundle\Request\RequestInterface; |
6
|
|
|
use Symfony\Component\HttpFoundation\File\File; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class AddMessageRequest |
10
|
|
|
* @package OmnideskBundle\Request\Message |
11
|
|
|
*/ |
12
|
|
|
class AddMessageRequest implements RequestInterface |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* @var int |
16
|
|
|
*/ |
17
|
|
|
private $caseId; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
private $content; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $contentHtml; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var int |
31
|
|
|
*/ |
32
|
|
|
private $staffId; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var int |
36
|
|
|
*/ |
37
|
|
|
private $userId; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var ArrayCollection|File[] |
41
|
|
|
*/ |
42
|
|
|
private $attachments; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return int |
46
|
|
|
*/ |
47
|
|
|
public function getCaseId() |
48
|
|
|
{ |
49
|
|
|
return $this->caseId; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @param int $caseId |
54
|
|
|
* @return $this |
55
|
|
|
*/ |
56
|
|
|
public function setCaseId($caseId) |
57
|
|
|
{ |
58
|
|
|
$this->caseId = $caseId; |
59
|
|
|
|
60
|
|
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return string |
65
|
|
|
*/ |
66
|
|
|
public function getContent() |
67
|
|
|
{ |
68
|
|
|
return $this->content; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param string $content |
73
|
|
|
* @return $this |
74
|
|
|
*/ |
75
|
|
|
public function setContent($content) |
76
|
|
|
{ |
77
|
|
|
$this->content = $content; |
78
|
|
|
|
79
|
|
|
return $this; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return string |
84
|
|
|
*/ |
85
|
|
|
public function getContentHtml() |
86
|
|
|
{ |
87
|
|
|
return $this->contentHtml; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @param string $contentHtml |
92
|
|
|
* @return $this |
93
|
|
|
*/ |
94
|
|
|
public function setContentHtml($contentHtml) |
95
|
|
|
{ |
96
|
|
|
$this->contentHtml = $contentHtml; |
97
|
|
|
|
98
|
|
|
return $this; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return int |
103
|
|
|
*/ |
104
|
|
|
public function getStaffId() |
105
|
|
|
{ |
106
|
|
|
return $this->staffId; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @param int $staffId |
111
|
|
|
* @return $this |
112
|
|
|
*/ |
113
|
|
|
public function setStaffId($staffId) |
114
|
|
|
{ |
115
|
|
|
$this->staffId = $staffId; |
116
|
|
|
|
117
|
|
|
return $this; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return int |
122
|
|
|
*/ |
123
|
|
|
public function getUserId() |
124
|
|
|
{ |
125
|
|
|
return $this->userId; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param int $userId |
130
|
|
|
* @return $this |
131
|
|
|
*/ |
132
|
|
|
public function setUserId($userId) |
133
|
|
|
{ |
134
|
|
|
$this->userId = $userId; |
135
|
|
|
|
136
|
|
|
return $this; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @return ArrayCollection|File[] |
141
|
|
|
*/ |
142
|
|
|
public function getAttachments() |
143
|
|
|
{ |
144
|
|
|
return $this->attachments; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @param File $attachment |
149
|
|
|
*/ |
150
|
|
|
public function addAttachment(File $attachment) |
151
|
|
|
{ |
152
|
|
|
$this->attachments->add($attachment); |
153
|
|
|
} |
154
|
|
|
} |
155
|
|
|
|