PHP code example of microinginer / yii2-dropdown-action-column
1. Go to this page and download the library: Download microinginer/yii2-dropdown-action-column library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
microinginer / yii2-dropdown-action-column example snippets
echo \yii\grid\GridView::widget([
...
'columns' => [
...
[
'class' => \microinginer\dropDownActionColumn\DropDownActionColumn::className(),
],
],
]);
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'
],
],
]
],
],
]);