view/helpers: add $this->widget()

This commit is contained in:
Thomas Gelf 2014-06-17 13:53:05 +00:00
parent a53f589a6b
commit d63d8fe451
1 changed files with 5 additions and 0 deletions

View File

@ -3,8 +3,13 @@
namespace Icinga\Web\View; namespace Icinga\Web\View;
use Icinga\Authentication\Manager; use Icinga\Authentication\Manager;
use Icinga\Web\Widget;
$this->addHelperFunction('auth', function () { $this->addHelperFunction('auth', function () {
return Manager::getInstance(); return Manager::getInstance();
}); });
$this->addHelperFunction('widget', function ($name, $options) {
return Widget::create($name, $options);
});