mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
ActionController: provide central table helpers
This commit is contained in:
parent
e898b8e013
commit
bc95c25d96
@ -179,17 +179,4 @@ class ListController extends ActionController
|
||||
// $api->wipeInactiveStages();
|
||||
}
|
||||
}
|
||||
|
||||
protected function prepareTable($name)
|
||||
{
|
||||
$table = $this->loadTable($name)->setConnection($this->db());
|
||||
$this->view->filterEditor = $table->getFilterEditor($this->getRequest());
|
||||
$this->view->table = $this->applyPaginationLimits($table);
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function prepareAndRenderTable($name)
|
||||
{
|
||||
$this->prepareTable($name)->render('table');
|
||||
}
|
||||
}
|
||||
|
@ -147,6 +147,19 @@ abstract class ActionController extends Controller
|
||||
return $this->view->tabs;
|
||||
}
|
||||
|
||||
protected function prepareTable($name)
|
||||
{
|
||||
$table = $this->loadTable($name)->setConnection($this->db());
|
||||
$this->view->filterEditor = $table->getFilterEditor($this->getRequest());
|
||||
$this->view->table = $this->applyPaginationLimits($table);
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function prepareAndRenderTable($name)
|
||||
{
|
||||
$this->prepareTable($name)->render('list/table', null, true);
|
||||
}
|
||||
|
||||
protected function api($endpointName = null)
|
||||
{
|
||||
if ($this->api === null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user