microinginer/yii2-dropdown-action-column

1.0.3 2018-12-10 15:45 UTC

This package is auto-updated.

Last update: 2024-11-11 04:39:07 UTC


README

Russian readme

##Default buttons

echo \yii\grid\GridView::widget([
    ...
    'columns'      => [
        ...
        [
            'class' => \microinginer\dropDownActionColumn\DropDownActionColumn::className(),
        ],
    ],
]);

alternative yii\grid\ActionColumn default buttons

##Custom buttons

echo \yii\grid\GridView::widget([
    ...
    'columns'      => [
        ...
        [
            'class' => \microinginer\dropDownActionColumn\DropDownActionColumn::className(),
            'items' => [
                [
                    'label' => 'View',
                    'url'   => ['view'],
                ],
                [
                    'label' => 'Export',
                    'url'   => ['expert'],
                ],
                [
                    'label'   => 'Disable',
                    'url'     => ['disable'],
                    'linkOptions' => [
                        'data-method' => 'post'
                    ],
                ],
            ]
        ],
    ],
]);

alternative yii\grid\ActionColumn custom buttons

##Install

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist microinginer/yii2-dropdown-action-column "dev-master"

or add

"microinginer/yii2-dropdown-action-column": "dev-master"

to the require section of your composer.json file.