Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| CheckboxOptions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Pdf\Writer\Form; |
| 6 | |
| 7 | /** |
| 8 | * Options for {@see \Phpdftk\Pdf\Writer\PdfDoc::addCheckbox()}. |
| 9 | * |
| 10 | * `onValue` is the export value emitted when the checkbox is ticked |
| 11 | * (PDF convention: `Yes`). `defaultChecked` controls the initial state. |
| 12 | */ |
| 13 | final class CheckboxOptions |
| 14 | { |
| 15 | public function __construct( |
| 16 | public readonly string $onValue = 'Yes', |
| 17 | public readonly bool $defaultChecked = false, |
| 18 | public readonly bool $required = false, |
| 19 | public readonly bool $readOnly = false, |
| 20 | ) {} |
| 21 | } |