Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.24 KB

README.md

File metadata and controls

47 lines (36 loc) · 1.24 KB

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.