Tables: get rid of assemble workaround

This commit is contained in:
Thomas Gelf 2017-07-20 14:58:23 +02:00
parent 7bfdeabe46
commit 014963f96c
7 changed files with 6 additions and 29 deletions

View File

@ -35,12 +35,6 @@ class ApplyRulesTable extends ZfQueryBasedTable
return ['Name', 'assign where'/*, 'Actions'*/];
}
public function assemble()
{
$this->generateHeader();
return parent::assemble();
}
public function renderRow($row)
{
$url = Url::fromPath("director/{$this->type}/edit", [

View File

@ -24,12 +24,6 @@ class ObjectSetTable extends ZfQueryBasedTable
return $table;
}
public function assemble()
{
$this->generateHeader();
return parent::assemble();
}
public function getType()
{
return $this->type;

View File

@ -123,12 +123,6 @@ class ObjectsTable extends ZfQueryBasedTable
return $cols;
}
public function assemble()
{
$this->generateHeader();
parent::assemble();
}
public function renderRow($row)
{
$tr = static::tr([

View File

@ -36,7 +36,5 @@ class ObjectsTableHost extends ObjectsTable
'director/hosts',
['name']
);
parent::assemble();
}
}

View File

@ -37,7 +37,6 @@ class ObjectsTableService extends ObjectsTable
'director/services',
['id']
);
parent::assemble();
}
public function getColumnsToBeRendered()

View File

@ -28,12 +28,6 @@ class TemplatesTable extends ZfQueryBasedTable
return $table;
}
public function assemble()
{
$this->generateHeader();
return parent::assemble();
}
public function getType()
{
return $this->type;

View File

@ -102,10 +102,14 @@ abstract class ZfQueryBasedTable extends Table
abstract protected function prepareQuery();
public function assemble()
public function renderContent()
{
$this->header();
if (count($this->getColumnsToBeRendered())) {
$this->generateHeader();
}
$this->fetchRows();
return parent::renderContent();
}
protected function splitByDay($timestamp)