isavon/yii2-grid

The Grid extension for the Yii2 Framework

Installs: 2

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0 2022-07-11 12:25 UTC

This package is auto-updated.

Last update: 2025-06-11 19:39:50 UTC


README

yii2-grid

Installation

The preferred way to install this extension is through composer.

To install, either run

$ php composer.phar require isavon/yii2-grid "@dev"

or add

"isavon/yii2-grid": "@dev"

to the require section of your composer.json file.

Changes

NOTE: Refer the CHANGE LOG for details on changes to various releases.

Usage

Add ActionColumn to view file.

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'summary' => false,
    'columns' => [
        'id',
        'name',
        'url',
        [
            'class' => 'isavon\grid\ActionColumn',
            'template' => '{images} {update} {delete}',
            'urls' => function($model) {
                return [
                    'images' => Url::to(['work-image/index', 'workid' => $model->id]),
                ];
            },
            'contentOptions' => ['class' => 'text-center'],
            'header' => 'Actions',
        ]
    ]
]) ?>