summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Widget/ItemList/UsergroupList.php
blob: 2e95368ab387c5866c41441be56318bd1ed27e36 (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
29
<?php

/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */

namespace Icinga\Module\Icingadb\Widget\ItemList;

use Icinga\Module\Icingadb\Common\NoSubjectLink;
use Icinga\Module\Icingadb\Common\BaseItemList;
use ipl\Web\Url;

class UsergroupList extends BaseItemList
{
    use NoSubjectLink;

    protected $defaultAttributes = ['class' => 'usergroup-list item-table'];

    protected function init()
    {
        parent::init();

        $this->getAttributes()->get('class')->removeValue('item-list');
        $this->setDetailUrl(Url::fromPath('icingadb/usergroup'));
    }

    protected function getItemClass(): string
    {
        return UsergroupListItem::class;
    }
}