apollo / yii2-xeditable
Yii2 X-editable trial
dev-master
2020-12-10 13:28 UTC
Requires
- php: >=5.4
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-05 06:25:14 UTC
README
#X-editable for yii2 trial. Provide only basis functionality. Not stable Usage:
echo GridView::widget([ ..... 'columns' => [ ...... [ 'value'=>function($data) { if(empty($data->is_active)) { return Yii::t('app','No'); } return Yii::t('app','Yes'); }, 'class' => \Apollo\EditableColumn::className(), 'dataType'=>'select', 'url'=>Yii::$app->urlManager->createUrl('/users/changeStatus'), 'editable'=>[ 'source'=>[ ['value'=>1, 'text'=>Yii::t('app','Yes')], ['value'=>0, 'text'=>Yii::t('app','No')] ], ], 'attribute' => 'is_active', 'format' => 'raw', 'filter' => ['1' => Yii::t('app', 'Yes'),'0' => Yii::t('app', 'No'),], ], ..... ] ..... ]);