Total Complexity | 7 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class FileRadio extends ATreeControl |
||
17 | { |
||
18 | use TRadio; |
||
19 | use TSubEntry; |
||
20 | |||
21 | protected string $templateLabel = ''; |
||
22 | |||
23 | /** |
||
24 | * @param ControlNode[] $nodes |
||
25 | * @return string |
||
26 | */ |
||
27 | 1 | protected function fillEntries(array $nodes): string |
|
28 | { |
||
29 | 1 | $list = HtmlElement::init('ul'); |
|
30 | 1 | foreach ($nodes as $subNode) { |
|
31 | 1 | if ($subNode->getNode() && $subNode->getNode()->isDir()) { |
|
32 | 1 | $entry = $this->getSubEntry($subNode); |
|
33 | 1 | $entry->addChild($this->fillEntries($subNode->getSubNodes())); |
|
34 | 1 | $list->addChild($entry); |
|
35 | } else { |
||
36 | 1 | $list->addChild($this->getEntry($subNode)); |
|
37 | } |
||
38 | } |
||
39 | 1 | return strval($list); |
|
40 | } |
||
41 | |||
42 | 1 | protected function getEntry(ControlNode $node): HtmlElement |
|
49 | } |
||
50 | |||
51 | 1 | protected function getInput(FileNode $node): Controls\AControl |
|
59 |