Skip to content

Commit 9d2652b

Browse files
authored
Added columOptions
1 parent 5a0c69d commit 9d2652b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/components/BaseColumn.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,23 @@ abstract class BaseColumn extends BaseObject
131131
*/
132132
public $nameSuffix;
133133

134+
/**
135+
* @var array|\Closure the HTML attributes for the indivdual table body column. This can be either an array
136+
* specifying the common HTML attributes for indivdual body column, or an anonymous function that
137+
* returns an array of the HTML attributes. It should have the following signature:
138+
*
139+
* ```php
140+
* function ($model, $index, $context)
141+
* ```
142+
*
143+
* - `$model`: the current data model being rendered
144+
* - `$index`: the zero-based index of the data model in the model array
145+
* - `$context`: the widget object
146+
*
147+
* @since 2.17.2
148+
*/
149+
public $columnOptions = [];
150+
134151
/**
135152
* @var Model|ActiveRecordInterface|array
136153
*/

0 commit comments

Comments
 (0)