2017-06-16 13:52:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Web\Table;
|
|
|
|
|
|
|
|
use Zend_Db_Select as ZfSelect;
|
|
|
|
|
|
|
|
class ObjectsTableHostTemplateChoice extends ObjectsTable
|
|
|
|
{
|
|
|
|
protected $columns = [
|
|
|
|
'object_name' => 'o.object_name',
|
|
|
|
'templates' => 'GROUP_CONCAT(t.object_name)'
|
|
|
|
];
|
|
|
|
|
2021-12-01 23:50:29 +01:00
|
|
|
protected function applyObjectTypeFilter(ZfSelect $query, ZfSelect $right = null)
|
2017-06-16 13:52:53 +02:00
|
|
|
{
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function prepareQuery()
|
|
|
|
{
|
|
|
|
return parent::prepareQuery()->joinLeft(
|
|
|
|
['t' => 'icinga_host'],
|
|
|
|
't.template_choice_id = o.id',
|
|
|
|
[]
|
|
|
|
)->group('o.id');
|
|
|
|
}
|
|
|
|
}
|