Conditions | 4 |
Paths | 3 |
Total Lines | 25 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function value($fields) |
||
21 | { |
||
22 | $url = Decorator::get_sanitized_value($this->base, $fields); |
||
23 | |||
24 | if (false === $url) { |
||
25 | return ''; |
||
26 | } |
||
27 | |||
28 | if (!empty($this->queryVars)) { |
||
29 | $queryVars = Decorator::get_sanitized_value($this->queryVars, $fields); |
||
30 | |||
31 | $sep = '?'; |
||
32 | \ksort($queryVars); |
||
33 | |||
34 | foreach ($queryVars as $var => $value) { |
||
35 | $url .= $sep . Decorator::value_url($var, $fields) . '=' . Decorator::value_url($value, $fields); |
||
36 | $sep = '&'; |
||
37 | } |
||
38 | } |
||
39 | |||
40 | |||
41 | $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url); |
||
42 | |||
43 | |||
44 | return $url; |
||
45 | } |
||
47 |