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'*/];
}
public function assemble()
{
$this->generateHeader();
return parent::assemble();
}
public function renderRow($row)
{
$url = Url::fromPath("director/{$this->type}/edit", [

View File

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

View File

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

View File

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

View File

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

View File

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