How customize icon set in ActionColumn class ?

Hello Everyone,

could anybody help me with such problem: I need disable delete button in ActionColumn of GridView depending of some value in row and add prompt for update button (prompt adds only if delete removed).

I use code like below, but it give me an error:


           [

                'class' => 'yii\grid\ActionColumn',

                'template' => function($data){return (!$data->is_used) ? '{update} {delete}' : '{update}';},

            ],

model has some fields and is_used one of them, when is_used equals true, I need show only update button + prompt or alert for clicking it (alert that file is used, cos there is no column in GridView with this value)




[

    'class' => 'yii\grid\ActionColumn',

    'template' => '{view} {update} {images} {delete}',

    'buttons' => [

        'images' => function ($url, $model, $key) { // <--- here you can override or create template for a button of a given name

             return Html::a('<span class="glyphicon glyphicon glyphicon-picture" aria-hidden="true"></span>', Url::to(['image/index', 'id' => $model->id]));

        }

     ],

],