-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gridview replaceTags
optimized to render content only if necessary using callbacks
#1072
Labels
Comments
kartik-v
added a commit
that referenced
this issue
Jul 25, 2023
kartik-v
added a commit
that referenced
this issue
Jul 25, 2023
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 aglobal function name or a callback setting in an array format as understood by PHP's
call_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:
The text was updated successfully, but these errors were encountered: