mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-13 00:44:25 +02:00
parent
9de6e4f950
commit
771cfbf4eb
21
application/views/helpers/QUrl.php
Normal file
21
application/views/helpers/QUrl.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
|
class Zend_View_Helper_QUrl extends Zend_View_Helper_Abstract
|
||||||
|
{
|
||||||
|
public function qUrl()
|
||||||
|
{
|
||||||
|
$params = func_get_args();
|
||||||
|
$url = array_shift($params);
|
||||||
|
if (isset($params[0])) {
|
||||||
|
$params = $params[0];
|
||||||
|
} else {
|
||||||
|
$params = array();
|
||||||
|
}
|
||||||
|
return Url::create($url, $params);
|
||||||
|
$params = array_map('rawurlencode', $params);
|
||||||
|
return $this->view->baseUrl(vsprintf($url, $params));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user