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\Module\Director\Hook\ImportSourceHook;
|
||||
use Icinga\Module\Director\Objects\ImportSource;
|
||||
use Icinga\Module\Director\PlainObjectRenderer;
|
||||
use ipl\Web\Table\SimpleQueryBasedTable;
|
||||
|
||||
class ImportsourceHookTable extends SimpleQueryBasedTable
|
||||
|
@ -50,6 +51,21 @@ class ImportsourceHookTable extends SimpleQueryBasedTable
|
|||
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()
|
||||
{
|
||||
if ($this->sourceHook === null) {
|
||||
|
|
Loading…
Reference in New Issue