Closed kartik-v closed 1 year ago
I'm not confident enough to make changes to file \yii2-grid\src**GridViewTrait.php at line 1644, function kartik\grid\GridView::replaceLayoutPart**, but I think it should treat callback as an array, and send it the parameters to that function.
This enhancement will update the
GridView::replaceTags
property behaviorreplaceTags
array, tags to replace in the rendered layout. Enter this as an associative array of the format$key => $callback
, where:$key
: string, defines the flag.$callback
: string|array, the callback function name that will return the value to be replaced. This can be a global function name or a callback setting in an array format as understood by PHP'scall_user_func_array
method. For example:For example:
Alternatively you can return a function name from your class or object as an array format. For example: