*Not supported*ZfTable 3.1. Awesome ZF2 table / grid (and much much more) generator with huge possibilities of decorating and conditioning. Integrated with DataTables, Doctrine 2, Bootstrap 2.0 and 3.0.
$this->initializable() is always called, because $this->isTableInit() is always false and would never set true. $tableInit is private and no method exist to change this variable.
My problem is, i can't change cell or rows outside my class. I want set the url in my controller and can't, because header exist till first i call render(). After i call the render() again in my view, all properties are overwrite, because $this->initializable() is again called.
e.g.:
/**
* Init configuration like setting header, decorators, filters and others
* (call in render method as well)
*/
protected function initializable()
{
if(!$this->getParamAdapter()){
throw new Exception\LogicException('Param Adapter is required');
}
if(!$this->getSource()){
throw new Exception\LogicException('Source data is required');
}
$this->init = true; //did you mean here $this->tableInit = true, $this->init doesn't exist
if (count($this->headers)) {
$this->setHeaders($this->headers);
}
$this->init();
$this->initFilters($this->getSource()->getSource());
}
I added a constructor, who create all $this->headers in my class. To avoid overwrite my created headerObject and check for exist header in addHeader().
Why you create the headerObject not till then you call render()?
$this->initializable() is always called, because $this->isTableInit() is always false and would never set true. $tableInit is private and no method exist to change this variable.
My problem is, i can't change cell or rows outside my class. I want set the url in my controller and can't, because header exist till first i call render(). After i call the render() again in my view, all properties are overwrite, because $this->initializable() is again called. e.g.:
//In my controller (or view)
Did you mean here: AbstractTable.php
I added a constructor, who create all $this->headers in my class. To avoid overwrite my created headerObject and check for exist header in addHeader().
Why you create the headerObject not till then you call render()?
Sorry for my bad English. :-)