grid\ActionColumn $visibleButtons

$visibleButtons public property (available since version 2.0.7)

Visibility conditions for each button. The array keys are the button names (without curly brackets), and the values are the boolean true/false or the anonymous function. When the button name is not specified in this array it will be shown by default. The callbacks must use the following signature:

function ($model, $key, $index) {
    return $model->status === 'editable';
}

Or you can pass a boolean value:

[
    'update' => \Yii::$app->user->can('update'),
],
doc_Yii
2016-10-30 17:03:59
Comments
Leave a Comment

Please login to continue.