| 1 | <?php | ||
| 14 | final class Field implements JsonSerializable | ||
| 15 | { | ||
| 16 | /** | ||
| 17 | * Shown as a bold heading above the value text. | ||
| 18 | * It cannot contain markup and will be escaped for you. | ||
| 19 | * | ||
| 20 | * @var string | ||
| 21 | */ | ||
| 22 | private $title; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * The text value of the field. | ||
| 26 | * It may contain standard message markup and must be escaped as normal. | ||
| 27 | * May be multi-line. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | private $value; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * An optional flag indicating whether the value is short enough to be displayed side-by-side with other values. | ||
| 35 | * | ||
| 36 | * @var bool | ||
| 37 | */ | ||
| 38 | private $short; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * AttachmentField constructor. | ||
| 42 | * | ||
| 43 | * @param string $title | ||
| 44 | * @param string $value | ||
| 45 | * @param bool $short | ||
| 46 | */ | ||
| 47 | 13 | public function __construct($title, $value, $short = false) | |
| 53 | |||
| 54 | /** | ||
| 55 |      * {@inheritdoc} | ||
| 56 | */ | ||
| 57 | 13 | public function jsonSerialize() | |
| 65 | } | ||
| 66 |