Hide Yii2 GridView Action buttons

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:


[  

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

        'contentOptions' => ['style' => 'width:260px;'],

        'header'=>'Actions',

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

        'buttons' => [


            //view button

            'view' => function ($url, $model) {

                return Html::a('<span class="fa fa-search"></span>View', $url, [

                            'title' => Yii::t('app', 'View'),

                            'class'=>'btn btn-primary btn-xs',                                  

                ]);

            },

        ],


        'urlCreator' => function ($action, $model, $key, $index) {

            if ($action === 'view') {

                $url ='/jobs/view?id='.$model->jobid;

                return $url;

        }


       ],

For reference: your question & answer on Stackoverflow: