Created
December 21, 2014 12:55
-
-
Save beatcode/1559515b0006254d84ad to your computer and use it in GitHub Desktop.
yii2 Checkbox als Ja Nein
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Or you could add a getDischargedLabel() function in your model :--> | |
public function getDischargedLabel() | |
{ | |
return $this->discharged ? 'Yes' : 'No'; | |
} | |
<!--And in your gridview :--> | |
[ | |
'attribute'=>'discharged', | |
'value'=> 'dischargedLabel', | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment