mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
ChoicesTable: more code cleanup
This commit is contained in:
parent
eb433ad03e
commit
7668ac5202
@ -4,7 +4,6 @@ namespace Icinga\Module\Director\Web\Table;
|
|||||||
|
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
use ipl\Html\Link;
|
use ipl\Html\Link;
|
||||||
use ipl\Web\Widget\ControlsAndContent;
|
|
||||||
use ipl\Web\Table\ZfQueryBasedTable;
|
use ipl\Web\Table\ZfQueryBasedTable;
|
||||||
use ipl\Web\Url;
|
use ipl\Web\Url;
|
||||||
|
|
||||||
@ -32,20 +31,6 @@ class ChoicesTable extends ZfQueryBasedTable
|
|||||||
return $table;
|
return $table;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderTo(ControlsAndContent $controller)
|
|
||||||
{
|
|
||||||
$url = $controller->url();
|
|
||||||
$this->initializeOptionalQuickSearch($controller);
|
|
||||||
$controller->content()->add([
|
|
||||||
$this->getPaginator($url),
|
|
||||||
$this
|
|
||||||
]);
|
|
||||||
|
|
||||||
if ($url->getParam('format') === 'sql') {
|
|
||||||
$controller->content()->prepend($this->dumpSqlQuery($url));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getType()
|
public function getType()
|
||||||
{
|
{
|
||||||
return $this->type;
|
return $this->type;
|
||||||
@ -63,9 +48,9 @@ class ChoicesTable extends ZfQueryBasedTable
|
|||||||
'name' => $row->object_name
|
'name' => $row->object_name
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this::tr(
|
return $this::row([
|
||||||
$this::td(Link::create($row->object_name, $url))
|
Link::create($row->object_name, $url)
|
||||||
);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepareQuery()
|
protected function prepareQuery()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user