Skip to content

consultnn/yii2-custom-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2-Custom-Grid Module

Plugin system for Yii2 GridView

Installation

The preferred way to install this extension is through composer.

Add dependence

"consultnn/yii2-custom-grid": "*"

to the require section of your composer.json file.

Existing plug-ins

Configuration

  1. Add grid view in your view with plugins parameter
echo consultnn\grid\GridView::widget(
    [
        'dataProvider' => $dataProvider,
        'filterModel' => $model,
        'plugins' => [
            \consultnn\grid\plugins\ResizableColumns::className(),
            [
                'class' => \consultnn\grid\plugins\Settings::className(),
                'url' => \yii\helpers\Url::to('/company/settings'),
                'storage' => Yii::$app->user->identity->settings,
                'activeColumns' => ['_id', 'name', 'type']
            ]
        ]
    ]
);
  1. Plugins attribute contains array of enabled component plugins.

About every supported plugin you may read in plugins docs

License

Auth module is released under the MIT License. See the bundled LICENSE.md for details.