| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 13 | public function render(array $parameters, HTMLNode $previous): HTMLNode |
||
| 14 | { |
||
| 15 | $id = 'upload' . Framework::counter(); |
||
| 16 | return HTMLNode::factory( |
||
| 17 | 'div', |
||
| 18 | [ |
||
| 19 | 'class' => 'formularium-upload' |
||
| 20 | ], |
||
| 21 | [ |
||
| 22 | HTMLNode::factory( |
||
| 23 | 'label', |
||
| 24 | [ |
||
| 25 | 'class' => 'formularium-label', |
||
| 26 | 'for' => $id |
||
| 27 | ], |
||
| 28 | $parameters[self::LABEL] ?? 'Upload file' |
||
| 29 | ), |
||
| 30 | HTMLNode::factory( |
||
| 31 | 'input', |
||
| 32 | [ |
||
| 33 | 'id' => $id, |
||
| 34 | 'class' => 'formularium-input', |
||
| 35 | 'type' => 'file' |
||
| 36 | ] |
||
| 37 | ), |
||
| 38 | HTMLNode::factory( |
||
| 39 | 'div', |
||
| 40 | ['class' => 'formularium-comment'], |
||
| 41 | $parameters[self::COMMENT] ?? '' |
||
| 42 | ) |
||
| 67 |