summaryrefslogtreecommitdiffstats
path: root/application/controllers/CommandsController.php
blob: 246028f124c0c38f2cdf4d338232093ed6b085b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace Icinga\Module\Director\Controllers;

use Icinga\Module\Director\Web\Controller\ObjectsController;

class CommandsController extends ObjectsController
{
    public function indexAction()
    {
        parent::indexAction();
        $validTypes = ['object', 'external_object'];
        $type = $this->params->get('type', 'object');
        if (! in_array($type, $validTypes)) {
            $type = 'object';
        }

        $this->table->setType($type);
    }
}