summaryrefslogtreecommitdiffstats
path: root/library/Director/Web/Table/NotificationTemplateUsageTable.php
blob: d8cd3d86db518fa01d5c93bcb76152c9d085fda8 (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 NotificationTemplateUsageTable 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)
        ];
    }
}