##Default buttons
echo \yii\grid\GridView::widget([
...
'columns' => [
...
[
'class' => \microinginer\dropDownActionColumn\DropDownActionColumn::className(),
],
],
]);
##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'
],
],
]
],
],
]);
##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.