public function TestingAppService::url in Forena Reports 8
Overrides AppService::url
File
- tests/
src/ Unit/ Mock/ TestingAppService.php, line 176
Class
Namespace
Drupal\Tests\forena\Unit\MockCode
public function url($path, $options) {
if (strpos($path, '/') !== 0 && strpos($path, 'http' == FALSE)) {
$path = "/{$path}";
}
$url = $path;
if (isset($options['query'])) {
$query_string = '?';
foreach ($options['query'] as $key => $value) {
$query_string .= "{$key}={$value}&";
}
$query_string = rtrim($query_string, '&');
$url .= $query_string;
}
return $url;
}