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

24 lines
591 B
PHP
Raw Permalink Normal View History

<?php
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later
2015-10-20 16:34:04 -04:00
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Web\Controller\ObjectsController;
2015-10-20 16:34:04 -04: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);
}
}