| 1 | <?php |
||
| 8 | class Attachment extends Partial implements AttachmentInterface |
||
| 9 | { |
||
| 10 | protected $required = ['fallback']; |
||
| 11 | protected $optional = [ |
||
| 12 | 'text', |
||
| 13 | 'pretext', |
||
| 14 | 'color', |
||
| 15 | 'fields', |
||
| 16 | 'author_name', |
||
| 17 | 'author_link', |
||
| 18 | 'author_icon', |
||
| 19 | 'title', |
||
| 20 | 'title_link', |
||
| 21 | 'image_url', |
||
| 22 | 'thumb_url', |
||
| 23 | 'mrkdwn_in', |
||
| 24 | ]; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | 16 | public function __construct($data = []) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 16 | protected function setDefaultOptions(OptionsResolver $resolver) |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @param FieldInterface $field |
||
| 52 | * |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | 4 | public function addField(FieldInterface $field) |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @return FieldCollection |
||
| 64 | */ |
||
| 65 | 2 | public function getFields() |
|
| 69 | } |
||
| 70 |