1 | <?php |
||
21 | class Attachment extends AbstractModel |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $title; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $titleLink; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $imageUrl; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $authorName; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | private $authorLink; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | private $authorIcon; |
||
52 | |||
53 | /** |
||
54 | * @var string |
||
55 | */ |
||
56 | private $preText; |
||
57 | |||
58 | /** |
||
59 | * @var string |
||
60 | */ |
||
61 | private $text; |
||
62 | |||
63 | /** |
||
64 | * @var string |
||
65 | */ |
||
66 | private $color; |
||
67 | |||
68 | /** |
||
69 | * @var string |
||
70 | */ |
||
71 | private $fallback; |
||
72 | |||
73 | /** |
||
74 | * @var string |
||
75 | */ |
||
76 | private $callbackId; |
||
77 | |||
78 | /** |
||
79 | * @var AttachmentField[]|ArrayCollection |
||
80 | */ |
||
81 | private $fields; |
||
82 | |||
83 | /** |
||
84 | * @var AttachmentAction[]|ArrayCollection |
||
85 | */ |
||
86 | private $actions; |
||
87 | |||
88 | /** |
||
89 | * @var Array |
||
90 | */ |
||
91 | private $mrkdwnIn; |
||
92 | |||
93 | 1 | public function __construct() |
|
98 | |||
99 | /** |
||
100 | * @param string $title |
||
101 | */ |
||
102 | 1 | public function setTitle($title) |
|
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | 1 | public function getTitle() |
|
114 | |||
115 | /** |
||
116 | * @param string $titleLink |
||
117 | */ |
||
118 | 1 | public function setTitleLink($titleLink) |
|
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | 1 | public function getTitleLink() |
|
130 | |||
131 | /** |
||
132 | * @param string $imageUrl |
||
133 | */ |
||
134 | 1 | public function setImageUrl($imageUrl) |
|
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | 1 | public function getImageUrl() |
|
146 | |||
147 | /** |
||
148 | * @param string $authorName |
||
149 | */ |
||
150 | 1 | public function setAuthorName($authorName) |
|
154 | |||
155 | /** |
||
156 | * @return string |
||
157 | */ |
||
158 | 1 | public function getAuthorName() |
|
162 | |||
163 | /** |
||
164 | * @param string $authorLink |
||
165 | */ |
||
166 | 1 | public function setAuthorLink($authorLink) |
|
170 | |||
171 | /** |
||
172 | * @return string |
||
173 | */ |
||
174 | 1 | public function getAuthorLink() |
|
178 | |||
179 | /** |
||
180 | * @param string $authorIcon |
||
181 | */ |
||
182 | 1 | public function setAuthorIcon($authorIcon) |
|
186 | |||
187 | /** |
||
188 | * @return string |
||
189 | */ |
||
190 | 1 | public function getAuthorIcon() |
|
194 | |||
195 | /** |
||
196 | * @param string $fallback Required text summary of the attachment that is shown by clients that understand attachments |
||
197 | * but choose not to show them. |
||
198 | */ |
||
199 | 1 | public function setFallback($fallback) |
|
203 | |||
204 | /** |
||
205 | * @return string Text summary of the attachment that is shown by clients that understand attachments |
||
206 | * but choose not to show them. |
||
207 | */ |
||
208 | 2 | public function getFallback() |
|
212 | |||
213 | /** |
||
214 | * @param string $callbackId Required if the attachment contains actions |
||
215 | */ |
||
216 | public function setCallbackId($callbackId) |
||
220 | |||
221 | /** |
||
222 | * @return string Returns the callback id |
||
223 | */ |
||
224 | 1 | public function getCallbackId() |
|
228 | /** |
||
229 | * @param string|null $preText Optional text that should appear above the formatted data. |
||
230 | */ |
||
231 | 1 | public function setPreText($preText = null) |
|
235 | |||
236 | /** |
||
237 | * @return string|null Optional text that should appear above the formatted data. |
||
238 | */ |
||
239 | 2 | public function getPreText() |
|
243 | |||
244 | /** |
||
245 | * @param string|null $text Optional text that should appear within the attachment. |
||
246 | */ |
||
247 | 1 | public function setText($text = null) |
|
251 | |||
252 | /** |
||
253 | * @return string|null Optional text that should appear within the attachment. |
||
254 | */ |
||
255 | 2 | public function getText() |
|
259 | |||
260 | /** |
||
261 | * @param string|null $color Can either be one of 'good', 'warning', 'danger', or any hex color code |
||
262 | */ |
||
263 | 1 | public function setColor($color = null) |
|
267 | |||
268 | /** |
||
269 | * @return string|null Can either be one of 'good', 'warning', 'danger', or any hex color code |
||
270 | */ |
||
271 | 2 | public function getColor() |
|
275 | |||
276 | /** |
||
277 | * @param AttachmentField $field |
||
278 | */ |
||
279 | 1 | public function addField(AttachmentField $field) |
|
283 | |||
284 | /** |
||
285 | * @return AttachmentField[]|ArrayCollection |
||
286 | */ |
||
287 | 2 | public function getFields() |
|
291 | |||
292 | /** |
||
293 | * @param array Valid values for mrkdwn_in are: ["pretext", "text", "fields"]. Setting "fields" will enable markup formatting for the value of each field |
||
294 | */ |
||
295 | public function setMrkdwnIn(Array $mrkdwnIn) |
||
299 | |||
300 | /** |
||
301 | * @return Array Valid values for mrkdwn_in are: ["pretext", "text", "fields"]. Setting "fields" will enable markup formatting for the value of each field |
||
302 | */ |
||
303 | public function getMrkdwnIn() |
||
307 | |||
308 | |||
309 | /** |
||
310 | * @param AttachmentAction $action |
||
311 | */ |
||
312 | 1 | public function addAction(AttachmentAction $action) |
|
316 | |||
317 | /** |
||
318 | * @return AttachmentAction[]|ArrayCollection |
||
319 | */ |
||
320 | 2 | public function getActions() |
|
324 | |||
325 | } |
||
326 |