<?php 

use yii\helpers\Html;
use common\widgets\GridView;

$this->title = 'Scopes';
/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var modules\oauth2\models\OauthScopesSearch $searchModel
 */
?>
<?= GridView::widget(
    ['dataProvider' => $dataProvider, 
    'filterModel' => $searchModel,
    'columns' => [
        'scope',
        [
            'class' => 'yii\grid\RadioButtonColumn', 
            'name' => 'is_default', 
            'radioOptions' => function ($model) {
                return [
                    'checked' => $model['is_default'] == 1, 
                    'value' => $model['is_default'] == 1
                ];
            }, 
            'headerOptions' => ['width' => '80px']
        ],
    ]
    ]
);
?>