mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-12-07 21:20:34 +01:00
The constructor of the class is now private, instantiation happens with Url::fromRequest and Url::fromPath. Also updated all occurences of Url and fixed the Qlink helper to not overwrite the baseUrl with null values refs #4381
20 lines
327 B
PHP
20 lines
327 B
PHP
<?php
|
|
|
|
namespace Icinga\Web\View;
|
|
|
|
use Icinga\Web\Url;
|
|
|
|
function url($path = null, $params = null)
|
|
{
|
|
if ($path === null) {
|
|
$url = Url::fromRequest();
|
|
if ($params !== null) {
|
|
$url->setParams($params);
|
|
}
|
|
} else {
|
|
$url = Url::fromPath($path, $params);
|
|
}
|
|
return $url;
|
|
}
|
|
|