Grid page size extension for yii 2 gridview
The preferred way to install this extension is through composer., (*1)
Either run, (*2)
php composer.phar require --prefer-dist webvimark/grid-page-size "*"
or add, (*3)
"webvimark/grid-page-size": "*"
to the require section of your composer.json
file., (*4)
If input in GridView, (*5)
= webvimark\extensions\GridPageSize\GridPageSize::widget([ 'pjaxId'=>'role-grid-pjax', ]) ?> 'role-grid-pjax', ]) ?> = yii\grid\GridView::widget([ 'id'=>'role-grid', 'dataProvider' => $dataProvider, 'pager'=>[ 'options'=>['class'=>'pagination pagination-sm'], 'hideOnSinglePage'=>true, 'lastPageLabel'=>'>>', 'firstPageLabel'=>' $searchModel, 'layout'=>'{items}', 'columns' => [ ['class' => 'yii\grid\SerialColumn', 'options'=>['style'=>'width:10px'] ], [ 'attribute'=>'description', 'value'=>function(Role $model){ return yii\helpers\Html::a($model->description, ['view', 'id'=>$model->name], ['data-pjax'=>0]); }, 'format'=>'raw', ], 'name', ['class' => 'yii\grid\CheckboxColumn', 'options'=>['style'=>'width:10px'] ], [ 'class' => 'yii\grid\ActionColumn', 'contentOptions'=>['style'=>'width:70px; text-align:center;'], ], ], ]); ?>{pager}{summary}'.webvimark\extensions\GridBulkActions\GridBulkActions::widget([ 'gridId'=>'role-grid', 'actions'=>[ yii\helpers\Url::to(['bulk-delete'])=>webvimark\extensions\GridBulkActions\GridBulkActions::t('app', 'Delete'),], ]).'