Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Jul 30, 2018
1 parent 63bbfeb commit 7f2f0a4
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/grid/BooleanColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ public function getDataCellValue($model, $key, $index)
{
$value = parent::getDataCellValue($model, $key, $index);

if (is_integer($value)) {
if ($value == 0) {
return $this->falseIcon;
} else {
return $this->trueIcon;
}
}

if (is_string($value)) {
if ($value == "N") {
return $this->falseIcon;
} else {
return $this->trueIcon;
}
}

if ($this->trueValue !== true) {
if ($value == $this->falseValue) {
return $this->falseIcon;
Expand All @@ -111,7 +127,7 @@ public function getDataCellValue($model, $key, $index)
if ($value !== null) {
return $value ? $this->trueIcon : $this->falseIcon;
}
return $this->showNullAsFalse ? $this->falseIcon : $value;
return $value . ($this->showNullAsFalse ? $this->falseIcon : $value);
}

}
Expand Down

0 comments on commit 7f2f0a4

Please sign in to comment.