summaryrefslogtreecommitdiffstats
path: root/library/Director/Web/Table/DependencyTemplateUsageTable.php
blob: 2c1de501fe246f7fc167b22d14d6de30818cc5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?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)
        ];
    }
}