summaryrefslogtreecommitdiffstats
path: root/library/Director/Web/ActionBar/ChoicesActionBar.php
blob: 7b59d2cfaebdea6a5740731b8d9959b842d72c26 (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
<?php

namespace Icinga\Module\Director\Web\ActionBar;

use gipfl\IcingaWeb2\Link;

class ChoicesActionBar extends DirectorBaseActionBar
{
    protected function assemble()
    {
        $type = $this->type;
        $this->add(
            $this->getBackToDashboardLink()
        )->add(
            Link::create(
                $this->translate('Add'),
                "director/templatechoice/$type",
                ['type' => 'object'],
                [
                    'title' => $this->translate('Create a new template choice'),
                    'class' => 'icon-plus',
                    'data-base-target' => '_next'
                ]
            )
        );
    }
}