When yii2 is used to generate a management list, there is a CheckboxColumns: className () which can generate a check box, but where is the "batch submit" button? I want to put the batch delete button in the & amp; lt; table & amp; gt; & amp; lt; tfooter & amp; gt; & amp; lt; tfooter & amp; gt; & amp; lt; t... use yii2 to generate a management list
CheckboxColumns::className()
This can generate check boxes, but where is the "batch submit" button? I want to put the batch delete button in
GridView
Generated
But cannot be controlled, unless modified
/vendor/
The class, the GridView (
D:\website\yii2\basic\vendor\yiisoft\yii2\grid\GridView.php
) Method
renderTableFooter
, How to generate
.
# File D: \ website \ yii2 \ basic \ vendor \ yiisoft \ yii2 \ grid \ GridView. php/*** Renders the table footer. * @ return string the rendering result. */public function renderTableFooter () {$ cells = []; foreach ($ this-> columns as $ column) {/* @ var $ column Column */$ cells [] = $ column-> renderFooterCell ();} $ content = Html: tag ('tr ', implode ('', $ cells), $ this-> footerRowOptions); if ($ this-> filterPosition = self: FILTER_POS_FOOTER) {$ content. = $ this-> renderFilters ();} return"\ N ". $ content." \ n";}
In foreach, colunms cannot be controlled and cannot be generated.
How does yii2 use the batch function?
Reply content:
Use yii2 to generate a management listCheckboxColumns::className()
This can generate check boxes, but where is the "batch submit" button? I want to put the batch delete button inGridView
Generated
But cannot be controlled, unless modified
/vendor/
The class, the GridView (
D:\website\yii2\basic\vendor\yiisoft\yii2\grid\GridView.php
) Method
renderTableFooter
, How to generate
.
# File D: \ website \ yii2 \ basic \ vendor \ yiisoft \ yii2 \ grid \ GridView. php/*** Renders the table footer. * @ return string the rendering result. */public function renderTableFooter () {$ cells = []; foreach ($ this-> columns as $ column) {/* @ var $ column Column */$ cells [] = $ column-> renderFooterCell ();} $ content = Html: tag ('tr ', implode ('', $ cells), $ this-> footerRowOptions); if ($ this-> filterPosition = self: FILTER_POS_FOOTER) {$ content. = $ this-> renderFilters ();} return"\ N ". $ content." \ n";}
In foreach, colunms cannot be controlled and cannot be generated.
How does yii2 use the batch function?
'Showfooter '=> true, and then 'footer' => 'batch delete '.