Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function resolveValues($value, array $args, ResolveInfo $info) { |
||
27 | if ($value instanceof MenuLinkTreeElement) { |
||
28 | $items = array_filter($value->subtree, function(MenuLinkTreeElement $item) { |
||
29 | if ($item->link instanceof MenuLinkInterface) { |
||
30 | return $item->link->isEnabled(); |
||
31 | } |
||
32 | return TRUE; |
||
33 | }); |
||
34 | |||
35 | foreach ($items as $branch) { |
||
36 | yield $branch; |
||
37 | } |
||
38 | } |
||
39 | } |
||
40 | |||
42 |