consultnn/yii2-custom-grid

Yii2 GridView with plugin support

Maintainers

Package info

github.com/consultnn/yii2-custom-grid

pkg:composer/consultnn/yii2-custom-grid

Statistics

Installs: 269

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v1.3.1 2020-03-17 14:48 UTC

This package is auto-updated.

Last update: 2026-02-18 04:13:22 UTC


README

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.