mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-25 23:04:53 +02:00
Tables: get rid of assemble workaround
This commit is contained in:
parent
7bfdeabe46
commit
014963f96c
@ -35,12 +35,6 @@ class ApplyRulesTable extends ZfQueryBasedTable
|
|||||||
return ['Name', 'assign where'/*, 'Actions'*/];
|
return ['Name', 'assign where'/*, 'Actions'*/];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assemble()
|
|
||||||
{
|
|
||||||
$this->generateHeader();
|
|
||||||
return parent::assemble();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderRow($row)
|
public function renderRow($row)
|
||||||
{
|
{
|
||||||
$url = Url::fromPath("director/{$this->type}/edit", [
|
$url = Url::fromPath("director/{$this->type}/edit", [
|
||||||
|
@ -24,12 +24,6 @@ class ObjectSetTable extends ZfQueryBasedTable
|
|||||||
return $table;
|
return $table;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assemble()
|
|
||||||
{
|
|
||||||
$this->generateHeader();
|
|
||||||
return parent::assemble();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getType()
|
public function getType()
|
||||||
{
|
{
|
||||||
return $this->type;
|
return $this->type;
|
||||||
|
@ -123,12 +123,6 @@ class ObjectsTable extends ZfQueryBasedTable
|
|||||||
return $cols;
|
return $cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assemble()
|
|
||||||
{
|
|
||||||
$this->generateHeader();
|
|
||||||
parent::assemble();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderRow($row)
|
public function renderRow($row)
|
||||||
{
|
{
|
||||||
$tr = static::tr([
|
$tr = static::tr([
|
||||||
|
@ -36,7 +36,5 @@ class ObjectsTableHost extends ObjectsTable
|
|||||||
'director/hosts',
|
'director/hosts',
|
||||||
['name']
|
['name']
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::assemble();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ class ObjectsTableService extends ObjectsTable
|
|||||||
'director/services',
|
'director/services',
|
||||||
['id']
|
['id']
|
||||||
);
|
);
|
||||||
parent::assemble();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColumnsToBeRendered()
|
public function getColumnsToBeRendered()
|
||||||
|
@ -28,12 +28,6 @@ class TemplatesTable extends ZfQueryBasedTable
|
|||||||
return $table;
|
return $table;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assemble()
|
|
||||||
{
|
|
||||||
$this->generateHeader();
|
|
||||||
return parent::assemble();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getType()
|
public function getType()
|
||||||
{
|
{
|
||||||
return $this->type;
|
return $this->type;
|
||||||
|
@ -102,10 +102,14 @@ abstract class ZfQueryBasedTable extends Table
|
|||||||
|
|
||||||
abstract protected function prepareQuery();
|
abstract protected function prepareQuery();
|
||||||
|
|
||||||
public function assemble()
|
public function renderContent()
|
||||||
{
|
{
|
||||||
$this->header();
|
if (count($this->getColumnsToBeRendered())) {
|
||||||
|
$this->generateHeader();
|
||||||
|
}
|
||||||
$this->fetchRows();
|
$this->fetchRows();
|
||||||
|
|
||||||
|
return parent::renderContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function splitByDay($timestamp)
|
protected function splitByDay($timestamp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user