I want to hide Yii2 GridView Action Column buttons on the base of model field status. If status is = 1 then hide view button only. How I can?
Code:
It can be done like this
[ 'class' => 'yii\grid\ActionColumn', 'contentOptions' => [], 'header'=>'Actions', 'template' => '{view} {update} {delete}', 'visibleButtons'=>[ 'view'=> function($model){ return $model->status!=1; }, ] ],