summaryrefslogtreecommitdiffstats
path: root/library/Pnp/Web/Controller.php
blob: 4af5c0639c08726aa112c5d7e8bea2cea112560f (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\Pnp\Web;

use Icinga\Web\Controller as IcingaController;

class Controller extends IcingaController
{
    public function init()
    {
        $this->getTabs()->add('pnp', array(
            'label' => $this->translate('PNP'),
            'url'   => 'pnp',
        ));
    }

    protected function setViewScript($name)
    {
        $this->_helper->viewRenderer->setNoController(true);
        $this->_helper->viewRenderer->setScriptAction($name);
    }

    protected function getBaseUrl()
    {
        return rtrim($this->Config()->get('pnp4nagios', 'base_url', '/pnp4nagios'), '/');
    }
}