2015-06-30 11:19:31 +02:00
|
|
|
<?php
|
|
|
|
|
2015-10-20 22:34:04 +02:00
|
|
|
namespace Icinga\Module\Director\Controllers;
|
|
|
|
|
2015-06-30 11:19:31 +02:00
|
|
|
use Icinga\Module\Director\Web\Controller\ObjectsController;
|
|
|
|
|
2015-10-20 22:34:04 +02:00
|
|
|
class CommandsController extends ObjectsController
|
2015-06-30 11:19:31 +02:00
|
|
|
{
|
2017-07-20 17:19:51 +02:00
|
|
|
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);
|
|
|
|
}
|
2015-06-30 11:19:31 +02:00
|
|
|
}
|