| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 12 | public function editable($value, Field $field, HTMLNode $previous): HTMLNode |
||
| 13 | { |
||
| 14 | $validators = $field->getValidators(); |
||
|
|
|||
| 15 | /** |
||
| 16 | * @var HTMLNode|null $element |
||
| 17 | */ |
||
| 18 | $element = $this->getInput($previous); |
||
| 19 | if (!$element) { |
||
| 20 | return $previous; |
||
| 21 | } |
||
| 22 | |||
| 23 | $element->setAttribute('min', $field->getValidatorOption(Min::class, 'value', '')); |
||
| 24 | $element->setAttribute('max', $field->getValidatorOption(Max::class, 'value', '')); |
||
| 25 | |||
| 26 | return parent::editable($value, $field, $previous); |
||
| 27 | } |
||
| 29 |