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 AttachmentField[]|ArrayCollection |
||
75 | */ |
||
76 | private $fields; |
||
77 | |||
78 | /** |
||
79 | * @var AttachmentAction[]|ArrayCollection |
||
80 | */ |
||
81 | private $actions; |
||
82 | |||
83 | /** |
||
84 | * @var Array |
||
85 | */ |
||
86 | private $mrkdwnIn; |
||
87 | |||
88 | 1 | public function __construct() |
|
93 | |||
94 | /** |
||
95 | * @param string $title |
||
96 | */ |
||
97 | 1 | public function setTitle($title) |
|
101 | |||
102 | /** |
||
103 | * @return string |
||
104 | */ |
||
105 | 1 | public function getTitle() |
|
109 | |||
110 | /** |
||
111 | * @param string $titleLink |
||
112 | */ |
||
113 | 1 | public function setTitleLink($titleLink) |
|
117 | |||
118 | /** |
||
119 | * @return string |
||
120 | */ |
||
121 | 1 | public function getTitleLink() |
|
125 | |||
126 | /** |
||
127 | * @param string $imageUrl |
||
128 | */ |
||
129 | 1 | public function setImageUrl($imageUrl) |
|
133 | |||
134 | /** |
||
135 | * @return string |
||
136 | */ |
||
137 | 1 | public function getImageUrl() |
|
141 | |||
142 | /** |
||
143 | * @param string $authorName |
||
144 | */ |
||
145 | 1 | public function setAuthorName($authorName) |
|
149 | |||
150 | /** |
||
151 | * @return string |
||
152 | */ |
||
153 | 1 | public function getAuthorName() |
|
157 | |||
158 | /** |
||
159 | * @param string $authorLink |
||
160 | */ |
||
161 | 1 | public function setAuthorLink($authorLink) |
|
165 | |||
166 | /** |
||
167 | * @return string |
||
168 | */ |
||
169 | 1 | public function getAuthorLink() |
|
173 | |||
174 | /** |
||
175 | * @param string $authorIcon |
||
176 | */ |
||
177 | 1 | public function setAuthorIcon($authorIcon) |
|
181 | |||
182 | /** |
||
183 | * @return string |
||
184 | */ |
||
185 | 1 | public function getAuthorIcon() |
|
189 | |||
190 | /** |
||
191 | * @param string $fallback Required text summary of the attachment that is shown by clients that understand attachments |
||
192 | * but choose not to show them. |
||
193 | */ |
||
194 | 1 | public function setFallback($fallback) |
|
198 | |||
199 | /** |
||
200 | * @return string Text summary of the attachment that is shown by clients that understand attachments |
||
201 | * but choose not to show them. |
||
202 | */ |
||
203 | 2 | public function getFallback() |
|
207 | |||
208 | /** |
||
209 | * @param string|null $preText Optional text that should appear above the formatted data. |
||
210 | */ |
||
211 | 1 | public function setPreText($preText = null) |
|
215 | |||
216 | /** |
||
217 | * @return string|null Optional text that should appear above the formatted data. |
||
218 | */ |
||
219 | 2 | public function getPreText() |
|
223 | |||
224 | /** |
||
225 | * @param string|null $text Optional text that should appear within the attachment. |
||
226 | */ |
||
227 | 1 | public function setText($text = null) |
|
231 | |||
232 | /** |
||
233 | * @return string|null Optional text that should appear within the attachment. |
||
234 | */ |
||
235 | 2 | public function getText() |
|
239 | |||
240 | /** |
||
241 | * @param string|null $color Can either be one of 'good', 'warning', 'danger', or any hex color code |
||
242 | */ |
||
243 | 1 | public function setColor($color = null) |
|
247 | |||
248 | /** |
||
249 | * @return string|null Can either be one of 'good', 'warning', 'danger', or any hex color code |
||
250 | */ |
||
251 | 2 | public function getColor() |
|
255 | |||
256 | /** |
||
257 | * @param AttachmentField $field |
||
258 | */ |
||
259 | 1 | public function addField(AttachmentField $field) |
|
263 | |||
264 | /** |
||
265 | * @return AttachmentField[]|ArrayCollection |
||
266 | */ |
||
267 | 2 | public function getFields() |
|
271 | |||
272 | /** |
||
273 | * @param array Valid values for mrkdwn_in are: ["pretext", "text", "fields"]. Setting "fields" will enable markup formatting for the value of each field |
||
274 | */ |
||
275 | public function setMrkdwnIn(Array $mrkdwnIn) |
||
279 | |||
280 | /** |
||
281 | * @return Array Valid values for mrkdwn_in are: ["pretext", "text", "fields"]. Setting "fields" will enable markup formatting for the value of each field |
||
282 | */ |
||
283 | public function getMrkdwnIn() |
||
287 | |||
288 | |||
289 | /** |
||
290 | * @param AttachmentAction $action |
||
291 | */ |
||
292 | 1 | public function addAction(AttachmentAction $action) |
|
293 | { |
||
294 | 1 | $this->actions->add($action); |
|
295 | 1 | } |
|
296 | |||
297 | /** |
||
298 | * @return AttachmentAction[]|ArrayCollection |
||
299 | */ |
||
300 | 2 | public function getActions() |
|
304 | |||
305 | } |
||
306 |