Add view helper url
This commit is contained in:
parent
ca09dc084d
commit
297b621bf6
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Web\View;
|
||||
|
||||
use Icinga\Web\Url;
|
||||
|
||||
function url($path = null, $params = null)
|
||||
{
|
||||
if ($path === null) {
|
||||
$url = Url::current();
|
||||
if ($params !== null) {
|
||||
$url->setParams($params);
|
||||
}
|
||||
} else {
|
||||
$url = Url::create($path, $params);
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
Loading…
Reference in New Issue