icingaweb2-module-director/library/Director/Web/Table/DependencyTemplateUsageTable.php
raviks789 dcd36877ea Make TemplateUsageTables and other tables compatible with director branches
`TemplateUsageTable`, `ApplyRulesTable`, `ObjectsTableSetmembers` and `TemplatesTable` are
made compatible with `director branches`.
2023-09-21 14:57:30 +02:00

29 lines
717 B
PHP

<?php
namespace Icinga\Module\Director\Web\Table;
use Icinga\Module\Director\Db;
class DependencyTemplateUsageTable extends TemplateUsageTable
{
public function getTypes()
{
return [
'templates' => $this->translate('Templates'),
'applyrules' => $this->translate('Apply Rules'),
];
}
protected function getSummaryTables(string $templateType, Db $connection)
{
return [
'templates' => TemplatesTable::create(
$templateType,
$connection
),
'applyrules' => ApplyRulesTable::create($templateType, $connection)
->setBranchUuid($this->branchUuid)
];
}
}