grid\DataColumn $value

$value public property

An anonymous function or a string that is used to determine the value to display in the current column.

If this is an anonymous function, it will be called for each row and the return value will be used as the value to display for every data model. The signature of this function should be: function ($model, $key, $index, $column). Where $model, $key, and $index refer to the model, key and index of the row currently being rendered and $column is a reference to the yii\grid\DataColumn object.

You may also set this property to a string representing the attribute name to be displayed in this column. This can be used when the attribute to be displayed is different from the $attribute that is used for sorting and filtering.

If this is not set, $model[$attribute] will be used to obtain the value, where $attribute is the value of $attribute.

public string|Closure $value = null
doc_Yii
2016-10-30 17:04:09
Comments
Leave a Comment

Please login to continue.