protected function getValue($row)
{
$column = $this->getColumn();
if (is_string($column)) {
return $this->grid->getProperty($row, Helpers::unformatColumnName($column));
} elseif (is_callable($column)) {
return call_user_func_array($column, [$row]);
} else {
throw new Exception('Column must be string or callback.');
}
}
/** * Returns cell prototype (<td> html tag). * @param mixed $row * @return \Nette\Utils\Html */ public function getCellPrototype($row = NULL) { $td = parent::getCellPrototype($row); if ($this->isEditable() && $row !== NULL) { $td->data['grido-editable-value'] = $this->editableValueCallback === NULL ? parent::getValue($row) : callback($this->editableValueCallback)->invokeArgs(array($row, $this)); } return $td; }