Open semihs opened 9 years ago
My Temporary solution required an edit in /vendor/dudapiotr/zftable/src/ZfTable/Decorator/Row/VarAttr.php
/** * Rendering decorator * * @param string $context * @return string */ public function render($context) { $values = array(); foreach ($this->vars as $var) { $actualRow = $this->getRow()->getActualRow(); if ( is_object($actualRow) ) { $values[] = $actualRow->$var; }else { $values[] = $actualRow[$var]; } } $value = vsprintf($this->value, $values); $this->getRow()->addVarAttr($this->name, $value); return $context; }
yes i have solved temporary.
https://github.com/noc-med/ZfTable/commit/bc2f830fbece04d983f8ccbddfb6db789b772ba6
Did you just change it directly in the VarAttr class? Or did you extend the class, and changed it in your version?
I changed it directly in the class in the source files as I was hoping it was just temporary and that a long term fix would be committed to the repo. I am still waiting on that though unfortunately.
i received fatal error when i use editable row with doctrine orm
error;
Fatal error: Cannot use object of type Application\Entity\Accounts as array in /var/www/dev.kultureltv.com/vendor/dudapiotr/zftable/src/ZfTable/Decorator/Row/VarAttr.php on line 43
my zftable model;
namespace Application\DataTable; use ZfTable\AbstractTable; class Accounts extends AbstractTable { protected $config = array( 'showPagination' => true, 'showQuickSearch' => false, 'showItemPerPage' => true, 'showColumnFilters' => true, 'rowAction' => '/ajax/account/update', );
}