Table: override inherited assemble method

This is an ugly workaround for now, need to find a better solution
This commit is contained in:
Thomas Gelf 2017-07-19 19:07:42 +02:00
parent 37b3a8da82
commit db31f337f1
6 changed files with 30 additions and 2 deletions

View File

@ -35,6 +35,12 @@ 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", [

View File

@ -24,6 +24,12 @@ 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;

View File

@ -123,6 +123,12 @@ 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([

View File

@ -29,12 +29,14 @@ class ObjectsTableHost extends ObjectsTable
'address' => 'Address' 'address' => 'Address'
]; ];
protected function assemble() public function assemble()
{ {
$this->enableMultiSelect( $this->enableMultiSelect(
'director/hosts/edit', 'director/hosts/edit',
'director/hosts', 'director/hosts',
['name'] ['name']
); );
parent::assemble();
} }
} }

View File

@ -29,13 +29,15 @@ class ObjectsTableService extends ObjectsTable
'id' => 'o.id', 'id' => 'o.id',
]; ];
} }
protected function assemble()
public function assemble()
{ {
$this->enableMultiSelect( $this->enableMultiSelect(
'director/services/edit', 'director/services/edit',
'director/services', 'director/services',
['id'] ['id']
); );
parent::assemble();
} }
public function getColumnsToBeRendered() public function getColumnsToBeRendered()

View File

@ -28,6 +28,12 @@ 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;