icingaweb2-module-director/application/controllers/CommandsController.php

21 lines
480 B
PHP
Raw Normal View History

<?php
2015-10-20 22:34:04 +02:00
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Web\Controller\ObjectsController;
2015-10-20 22:34:04 +02:00
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);
}
}