summaryrefslogtreecommitdiffstats
path: root/library/Director/Dashboard/Dashlet/ChoicesDashlet.php
blob: efdbba5b0a9f9cad0eb2b49e8c8f4c28fc89b2c6 (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
30
31
32
33
34
35
36
37
38
39
40
41
<?php

namespace Icinga\Module\Director\Dashboard\Dashlet;

abstract class ChoicesDashlet extends Dashlet
{
    protected $icon = 'flapping';

    public function getTitle()
    {
        return $this->translate('Choices');
    }

    public function getSummary()
    {
        return $this->translate(
            'Combine multiple templates into meaningful Choices, making life'
            . ' easier for your users'
        );
    }

    protected function getType()
    {
        return strtolower(substr(
            substr(get_called_class(), strlen(__NAMESPACE__) + 1),
            0,
            - strlen('ChoicesDashlet')
        ));
    }

    public function getUrl()
    {

        return 'director/templatechoices/' . $this->getType();
    }

    public function listRequiredPermissions()
    {
        return array('director/admin');
    }
}