| Conditions | 1 |
| Paths | 1 |
| Total Lines | 40 |
| Code Lines | 26 |
| 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' . HTMLFramework::counter(); |
||
| 16 | return HTMLNode::factory( |
||
| 17 | 'div', |
||
| 18 | [ |
||
| 19 | 'class' => 'formularium-upload file' |
||
| 20 | ], |
||
| 21 | [ |
||
| 22 | HTMLNode::factory( |
||
| 23 | 'label', |
||
| 24 | [ |
||
| 25 | 'class' => 'formularium-label file-label', |
||
| 26 | 'for' => $id |
||
| 27 | ], |
||
| 28 | [ |
||
| 29 | HTMLNode::factory( |
||
| 30 | 'input', |
||
| 31 | [ |
||
| 32 | 'id' => $id, |
||
| 33 | 'class' => 'formularium-input file-input', |
||
| 34 | 'type' => 'file' |
||
| 35 | ] |
||
| 36 | ), |
||
| 37 | HTMLNode::factory( |
||
| 38 | 'span', |
||
| 39 | ['class' => 'file-cta'], |
||
| 40 | [ |
||
| 41 | HTMLNode::factory( |
||
| 42 | 'span', |
||
| 43 | ['class' => 'file-icon'], |
||
| 44 | HTMLNode::factory( |
||
| 45 | 'i', |
||
| 46 | ['class' => 'fas fa-upload'] |
||
| 47 | ) |
||
| 48 | ), |
||
| 49 | HTMLNode::factory( |
||
| 50 | 'span', |
||
| 51 | ['class' => 'file-label'], |
||
| 52 | $parameters[self::LABEL] ?? 'Upload file' |
||
| 53 | ) |
||
| 68 |