mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Change condition
This commit is contained in:
@ -141,10 +141,10 @@ class DataColumn extends Column
|
|||||||
protected function renderDataCellContent($model, $key, $index)
|
protected function renderDataCellContent($model, $key, $index)
|
||||||
{
|
{
|
||||||
if ($this->value !== null) {
|
if ($this->value !== null) {
|
||||||
if ($this->value instanceof \Closure) {
|
if (is_string($this->value)) {
|
||||||
$value = call_user_func($this->value, $model, $index, $this);
|
|
||||||
} else {
|
|
||||||
$value = ArrayHelper::getValue($model, $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) {
|
} elseif ($this->content === null && $this->attribute !== null) {
|
||||||
$value = ArrayHelper::getValue($model, $this->attribute);
|
$value = ArrayHelper::getValue($model, $this->attribute);
|
||||||
|
Reference in New Issue
Block a user