From d63d8fe451ee39bf7db79256c1f93ccef73a8dd9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 17 Jun 2014 13:53:05 +0000 Subject: [PATCH] view/helpers: add $this->widget() --- library/Icinga/Web/View/helpers/generic.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/Icinga/Web/View/helpers/generic.php b/library/Icinga/Web/View/helpers/generic.php index c1be41a2c..91c53ebd8 100644 --- a/library/Icinga/Web/View/helpers/generic.php +++ b/library/Icinga/Web/View/helpers/generic.php @@ -3,8 +3,13 @@ namespace Icinga\Web\View; use Icinga\Authentication\Manager; +use Icinga\Web\Widget; $this->addHelperFunction('auth', function () { return Manager::getInstance(); }); +$this->addHelperFunction('widget', function ($name, $options) { + return Widget::create($name, $options); +}); +