| 1 | <?php |
||
| 5 | class AttachmentField |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The required title field of the field. |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $title; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The required value of the field. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $value; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Whether the value is short enough to fit side by side with |
||
| 23 | * other values. |
||
| 24 | * |
||
| 25 | * @var bool |
||
| 26 | */ |
||
| 27 | protected $short = false; |
||
| 28 | |||
| 29 | public static function create($title, $value) |
||
| 33 | |||
| 34 | public function __construct(string $title, string $value) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Set the title of the field. |
||
| 42 | * |
||
| 43 | * @param string $title |
||
| 44 | * |
||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | public function setTitle(string $title) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Set the value of the field. |
||
| 56 | * |
||
| 57 | * @param string $value |
||
| 58 | * |
||
| 59 | * @return $this |
||
| 60 | */ |
||
| 61 | public function setValue(string $value) |
||
| 67 | |||
| 68 | public function displaySideBySide() |
||
| 74 | |||
| 75 | public function doNotDisplaySideBySide() |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Get the array representation of this attachment field. |
||
| 84 | * |
||
| 85 | * @return array |
||
| 86 | */ |
||
| 87 | public function toArray(): array |
||
| 95 | } |
||
| 96 |