Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function expand($values) { |
||
14 | $return = []; |
||
15 | foreach ($values as $value) { |
||
16 | // 'options' is required to be an array, otherwise the utility class |
||
17 | // Drupal\Core\Utility\UnroutedUrlAssembler::assemble() will complain. |
||
18 | $options = []; |
||
19 | if (!empty($value[2])) { |
||
20 | parse_str($value[2], $options); |
||
21 | } |
||
22 | $return[] = [ |
||
23 | 'options' => $options, |
||
24 | 'title' => $value[0], |
||
25 | 'uri' => $value[1], |
||
26 | ]; |
||
27 | } |
||
28 | return $return; |
||
29 | } |
||
30 | |||
32 |