mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 03:09:11 +02:00
TemplatesTable: allow to filter by inheritance
This commit is contained in:
parent
998bdb193e
commit
652c805387
@ -3,6 +3,8 @@
|
|||||||
namespace Icinga\Module\Director\Web\Table;
|
namespace Icinga\Module\Director\Web\Table;
|
||||||
|
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
|
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
|
||||||
|
use Icinga\Module\Director\Objects\IcingaObject;
|
||||||
use ipl\Html\Html;
|
use ipl\Html\Html;
|
||||||
use ipl\Html\Icon;
|
use ipl\Html\Icon;
|
||||||
use ipl\Html\Link;
|
use ipl\Html\Link;
|
||||||
@ -56,6 +58,20 @@ class TemplatesTable extends ZfQueryBasedTable
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function filterTemplate(
|
||||||
|
IcingaObject $template,
|
||||||
|
$inheritance = IcingaObjectFilterHelper::INHERIT_DIRECT
|
||||||
|
) {
|
||||||
|
IcingaObjectFilterHelper::filterByTemplate(
|
||||||
|
$this->getQuery(),
|
||||||
|
$template,
|
||||||
|
'o',
|
||||||
|
$inheritance
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
protected function prepareQuery()
|
protected function prepareQuery()
|
||||||
{
|
{
|
||||||
$type = $this->getType();
|
$type = $this->getType();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user