10 Yii::import(
'booster.widgets.TbDataColumn');
30 if ($this->grid->json) {
31 $header = array(
'id' => $this->
id);
33 if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {
34 $sort = $this->grid->dataProvider->getSort();
35 $label = isset($this->header) ? $this->header : $sort->resolveLabel($this->name);
37 if ($sort->resolveAttribute($this->name) !==
false) {
38 $label .=
'<span class="caret"></span>';
40 $content[
'content'] = $sort->link($this->name,
$label, array(
'class' =>
'sort-link'));
42 if ($this->name !== null && $this->header === null) {
43 if ($this->grid->dataProvider instanceof CActiveDataProvider) {
44 $content[
'content'] = CHtml::encode(
45 $this->grid->dataProvider->model->getAttributeLabel($this->name)
48 $content[
'content'] = CHtml::encode($this->name);
51 $content[
'content'] = trim($this->header) !==
'' ? $this->header
52 : $this->grid->blankDisplay;
55 return CMap::mergeArray($header, $content);