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

17 lines
402 B
PHP
Raw Normal View History

<?php
2015-02-03 15:49:34 +01:00
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | http://www.gnu.org/licenses/gpl-2.0.txt */
namespace Icinga\Web\View;
use Icinga\Authentication\Manager;
2014-06-17 15:53:05 +02:00
use Icinga\Web\Widget;
$this->addHelperFunction('auth', function () {
return Manager::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);
});