Commit 8c49dabb by Thiago Talma

Change condition

parent 5a232334
......@@ -141,10 +141,10 @@ class DataColumn extends Column
protected function renderDataCellContent($model, $key, $index)
{
if ($this->value !== null) {
if ($this->value instanceof \Closure) {
$value = call_user_func($this->value, $model, $index, $this);
} else {
if (is_string($this->value)) {
$value = ArrayHelper::getValue($model, $this->value);
} else {
$value = call_user_func($this->value, $model, $index, $this);
}
} elseif ($this->content === null && $this->attribute !== null) {
$value = ArrayHelper::getValue($model, $this->attribute);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment