Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function resolveValues($value, array $args, ResolveInfo $info) { |
||
32 | if (UrlHelper::isExternal($args['path'])) { |
||
33 | yield Url::fromUri($args['path']); |
||
34 | } |
||
35 | else { |
||
36 | $url = Url::fromUri("internal:{$args['path']}", ['routed_path' => $args['path']]); |
||
37 | if ($url->isRouted() && $url->access()) { |
||
38 | yield $url; |
||
39 | } |
||
40 | else { |
||
41 | yield new CacheableValue(NULL, ['4xx-response']); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 | |||
47 |