microinginer/yii2-dropdown-action-column

Alternative yii\grid\ActionColumn for yii2

  1. Default buttons
  2. Custom buttons
  3. Install

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.

0 0
1 follower
2 237 downloads
Yii Version: 2.0
License: MIT
Category: User Interface
Created on: Jun 25, 2018
Last updated: (not set)
Packagist Profile
Github Repository