mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
ObjectsController: template table for templates...
...but load the other one first to trick the autoloader
This commit is contained in:
parent
5b58aad56b
commit
5407c4fe7c
@ -4,7 +4,6 @@ namespace Icinga\Module\Director\Tables;
|
|||||||
|
|
||||||
use Icinga\Module\Director\Tables\IcingaHostTable;
|
use Icinga\Module\Director\Tables\IcingaHostTable;
|
||||||
|
|
||||||
require_once __DIR__ . '/IcingaHostTable.php';
|
|
||||||
class IcingaHostTemplateTable extends IcingaHostTable
|
class IcingaHostTemplateTable extends IcingaHostTable
|
||||||
{
|
{
|
||||||
protected $searchColumns = array(
|
protected $searchColumns = array(
|
||||||
|
@ -112,7 +112,10 @@ abstract class ObjectsController extends ActionController
|
|||||||
$table = 'icinga' . ucfirst($type);
|
$table = 'icinga' . ucfirst($type);
|
||||||
} elseif ($dummy->isTemplate()) {
|
} elseif ($dummy->isTemplate()) {
|
||||||
$this->getTabs()->activate('templates');
|
$this->getTabs()->activate('templates');
|
||||||
|
// Trick the autoloader
|
||||||
$table = 'icinga' . ucfirst($type);
|
$table = 'icinga' . ucfirst($type);
|
||||||
|
$this->loadTable($table);
|
||||||
|
$table .= 'Template';
|
||||||
} else {
|
} else {
|
||||||
$this->getTabs()->activate('objects');
|
$this->getTabs()->activate('objects');
|
||||||
$table = 'icinga' . ucfirst($type);
|
$table = 'icinga' . ucfirst($type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user