|
|
@ -175,7 +175,14 @@ class DataColumn extends Column { |
|
|
|
|
|
|
|
return call_user_func($this->value, $model, $key, $index, $this); |
|
|
|
} elseif ($this->attribute !== null) { |
|
|
|
return ArrayHelper::getValue($model, $this->attribute); |
|
|
|
$val = ArrayHelper::getValue($model, $this->attribute); |
|
|
|
if ($this->showConstText) { |
|
|
|
$constArrKey = Inflector::variablize($this->attribute, '_'); |
|
|
|
if (isset($model::$$constArrKey)) { |
|
|
|
$val = $model::$$constArrKey[$val]; |
|
|
|
} |
|
|
|
} |
|
|
|
return $val; |
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|