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'*/];
|
||||
}
|
||||
|
||||
public function assemble()
|
||||
{
|
||||
$this->generateHeader();
|
||||
return parent::assemble();
|
||||
}
|
||||
|
||||
public function renderRow($row)
|
||||
{
|
||||
$url = Url::fromPath("director/{$this->type}/edit", [
|
||||
|
|
|
@ -24,12 +24,6 @@ class ObjectSetTable extends ZfQueryBasedTable
|
|||
return $table;
|
||||
}
|
||||
|
||||
public function assemble()
|
||||
{
|
||||
$this->generateHeader();
|
||||
return parent::assemble();
|
||||
}
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
|
|
|
@ -123,12 +123,6 @@ class ObjectsTable extends ZfQueryBasedTable
|
|||
return $cols;
|
||||
}
|
||||
|
||||
public function assemble()
|
||||
{
|
||||
$this->generateHeader();
|
||||
parent::assemble();
|
||||
}
|
||||
|
||||
public function renderRow($row)
|
||||
{
|
||||
$tr = static::tr([
|
||||
|
|
|
@ -36,7 +36,5 @@ class ObjectsTableHost extends ObjectsTable
|
|||
'director/hosts',
|
||||
['name']
|
||||
);
|
||||
|
||||
parent::assemble();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ class ObjectsTableService extends ObjectsTable
|
|||
'director/services',
|
||||
['id']
|
||||
);
|
||||
parent::assemble();
|
||||
}
|
||||
|
||||
public function getColumnsToBeRendered()
|
||||
|
|
|
@ -28,12 +28,6 @@ class TemplatesTable extends ZfQueryBasedTable
|
|||
return $table;
|
||||
}
|
||||
|
||||
public function assemble()
|
||||
{
|
||||
$this->generateHeader();
|
||||
return parent::assemble();
|
||||
}
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue