| 1 | <?php |
||
| 11 | class AttachmentField extends DataObject |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Creates a new attachment field. |
||
| 15 | * |
||
| 16 | * @param string $title A text heading for the field. |
||
| 17 | * @param string $value The text value of the field. |
||
| 18 | * @param bool $short Indicates if the value can be displayed side-by-side with other values. |
||
| 19 | */ |
||
| 20 | 2 | public function __construct($title, $value, $short = true) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Gets the text heading for the field. |
||
| 29 | * |
||
| 30 | * @return string The text heading for the field. |
||
| 31 | */ |
||
| 32 | 2 | public function getTitle() |
|
| 36 | |||
| 37 | /** |
||
| 38 | * Gets the text value of the field. |
||
| 39 | * |
||
| 40 | * @return string The text value of the field. |
||
| 41 | */ |
||
| 42 | 2 | public function getValue() |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Checks if the value can be displayed side-by-side with other values. |
||
| 49 | * |
||
| 50 | * @return bool True if the value is short, otherwise false. |
||
| 51 | */ |
||
| 52 | 2 | public function isShort() |
|
| 56 | } |
||
| 57 |