-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDataColumn.php
More file actions
36 lines (27 loc) · 980 Bytes
/
Copy pathDataColumn.php
File metadata and controls
36 lines (27 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace dacduong\inlinegrid;
use kartik\grid\DataColumn as KartikDataColumn;
use yii\helpers\Html;
class DataColumn extends KartikDataColumn {
public $cssClass = 'dd-data';
/**
* @inheritdoc
*/
public function renderDataCell($model, $key, $index)
{
$options = $this->fetchContentOptions($model, $key, $index);
$this->parseGrouping($options, $model, $key, $index);
$this->parseExcelFormats($options, $model, $key, $index);
$this->initPjax($this->_clientScript);
//add class identity class
if (!array_key_exists('class', $options)) {
$options['class'] = $this->cssClass;
} else {
$options['class'] .= " $this->cssClass";
}
if ($this->attribute) {
$options['class'] .= " value-$this->attribute";
}
return Html::tag('td', $this->renderDataCellContent($model, $key, $index), $options);
}
}