Просто, если его использовать
Код: Выделить всё
[
'attribute' => 'id',
'options'=>['class'=>'text-center'],
],
Код: Выделить всё
<colgroup><col>
<col>
<col class="text-center">
<col>
<col>
<col>
<col>
<col>
<col></colgroup>
Код: Выделить всё
[
'attribute' => 'id',
'options'=>['class'=>'text-center'],
],
Код: Выделить всё
<colgroup><col>
<col>
<col class="text-center">
<col>
<col>
<col>
<col>
<col>
<col></colgroup>
ширина колонки задаётся через contentOptions/**
* @var array the HTML attributes for the column group tag.
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
public $options = [];
Для чего же $options .../**
* @var array|\Closure the HTML attributes for the data cell tag. This can either be an array of
* attributes or an anonymous function ([[Closure]]) that returns such an array.
* The signature of the function should be the following: `function ($model, $key, $index, $column)`.
* A function may be used to assign different attributes to different rows based on the data in that row.
*
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
public $contentOptions = [];