Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GridView::widget([
- // ...
- // --------------------- КЛАСС ДЛЯ строки -------------------------------
- 'rowOptions'=>function ($model, $key, $index, $grid){
- $class=($model->confirmed)?'confirmed-row':'';
- return [
- 'key'=>$key,
- 'index'=>$index,
- 'class'=>$class
- ];
- },
- 'columns' => [
- [
- 'attribute' => 'confirmed',
- // ---------------------- КЛАСС ДЛЯ СТОЛБЦА -----------------------
- 'contentOptions' => ['class' => 'text-center'],
- 'value' => function ($model) {
- // ...
- },
- 'format' => 'html',
- ],
- ],
- ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement