答案 0 :(得分:0)
为构建函数分配所需的值,以便重新获得所需的值 为页脚分配你需要的var(或函数) 并在网格配置中设置showFooter = TRUE
<?php
$mySummary ="i want to this in summary text";
echo GridView::widget([
'dataProvider' => $provider,
'showFooter'=>TRUE,
'summaryOptions' => [
'class' => 'bg-primary text-white',
],
'columns' => [
'id',
[
'attribute' => 'address',
'footer' => $mySummary,
]
'email',
.....
答案 1 :(得分:0)
我找到了我想要的东西
'caption'=>'<h2>Javed</h2>',
'captionOptions' => [
'class' => 'bg-primary text-white',
],