mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
ImportsourceHookTable: use PlainObjectRenderer
This commit is contained in:
parent
719ca9d271
commit
ffb0177a16
@ -5,6 +5,7 @@ namespace Icinga\Module\Director\Web\Table;
|
|||||||
use Icinga\Data\DataArray\ArrayDatasource;
|
use Icinga\Data\DataArray\ArrayDatasource;
|
||||||
use Icinga\Module\Director\Hook\ImportSourceHook;
|
use Icinga\Module\Director\Hook\ImportSourceHook;
|
||||||
use Icinga\Module\Director\Objects\ImportSource;
|
use Icinga\Module\Director\Objects\ImportSource;
|
||||||
|
use Icinga\Module\Director\PlainObjectRenderer;
|
||||||
use ipl\Web\Table\SimpleQueryBasedTable;
|
use ipl\Web\Table\SimpleQueryBasedTable;
|
||||||
|
|
||||||
class ImportsourceHookTable extends SimpleQueryBasedTable
|
class ImportsourceHookTable extends SimpleQueryBasedTable
|
||||||
@ -50,6 +51,21 @@ class ImportsourceHookTable extends SimpleQueryBasedTable
|
|||||||
return $this->getColumns();
|
return $this->getColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function renderRow($row)
|
||||||
|
{
|
||||||
|
$tr = $this::tr();
|
||||||
|
|
||||||
|
foreach ($this->getColumnsToBeRendered() as $column) {
|
||||||
|
$td = $this::td();
|
||||||
|
if (property_exists($row, $column)) {
|
||||||
|
$td->setContent(PlainObjectRenderer::render($row->$column));
|
||||||
|
}
|
||||||
|
$tr->add($td);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $tr;
|
||||||
|
}
|
||||||
|
|
||||||
protected function sourceHook()
|
protected function sourceHook()
|
||||||
{
|
{
|
||||||
if ($this->sourceHook === null) {
|
if ($this->sourceHook === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user