File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1111use yii \base \Widget ;
1212use yii \helpers \ArrayHelper ;
1313use yii \helpers \Html ;
14+ use yii \helpers \Inflector ;
1415use yii \helpers \Json ;
1516use yii \web \JsExpression ;
16- use yii \helpers \Inflector ;
1717
1818class DataTable extends Widget
1919{
20+ const COLUMN_TYPE_DATE = 'date ' ;
21+ const COLUMN_TYPE_NUM = 'num ' ;
22+ const COLUMN_TYPE_NUM_FMT = 'num-fmt ' ;
23+ const COLUMN_TYPE_HTML_NUM = 'html-num ' ;
24+ const COLUMN_TYPE_HTML_NUM_FMT = 'html-num-fmt ' ;
25+ const COLUMN_TYPE_STRING = 'string ' ;
26+
2027 public $ id ;
2128 /**
2229 * @var boolean Feature control DataTables' smart column width handling
@@ -361,8 +368,8 @@ protected function initColumns()
361368 if (is_string ($ value )) {
362369 $ this ->columns [$ key ] = ['data ' => $ value , 'title ' => Inflector::camel2words ($ value )];
363370 }
364- if (isset ($ value ['type ' ])){
365- if ($ value ['type ' ] == 'link ' ){
371+ if (isset ($ value ['type ' ])) {
372+ if ($ value ['type ' ] == 'link ' ) {
366373 $ value ['class ' ] = LinkColumn::className ();
367374 }
368375 }
You can’t perform that action at this time.
0 commit comments