icingaweb2/library/Icinga/Web/View/helpers/generic.php

17 lines
363 B
PHP
Raw Normal View History

<?php
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
namespace Icinga\Web\View;
use Icinga\Authentication\Auth;
2014-06-17 15:53:05 +02:00
use Icinga\Web\Widget;
$this->addHelperFunction('auth', function () {
return Auth::getInstance();
});
2014-06-20 13:18:52 +02:00
$this->addHelperFunction('widget', function ($name, $options = null) {
2014-06-17 15:53:05 +02:00
return Widget::create($name, $options);
});