icingaweb2-module-director/library/Director/Web/Table/ObjectsTableHostTemplateChoice.php
Alexander A. Klimov ff92b0a485 For method parameters, use ?T $x = null, not T $x = null
Implicitly marking parameters as nullable is deprecated, the explicit nullable type must be used instead.
2026-04-16 09:38:24 +02:00

27 lines
621 B
PHP

<?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)'
];
protected function applyObjectTypeFilter(ZfSelect $query, ?ZfSelect $right = null)
{
return $query;
}
protected function prepareQuery()
{
return parent::prepareQuery()->joinLeft(
['t' => 'icinga_host'],
't.template_choice_id = o.id',
[]
)->group('o.id');
}
}