| 12345678910111213141516171819202122 |
- <?php
- namespace common\libs\dataList\column;
- class YesNo extends AbstractColumn implements InterfaceColumn {
- public $label = [
- 'yes' => 'Yes',//yes
- 'no' => 'No',//NO
- ];
- public function __construct($config = []) {
- parent::__construct($config);
- }
- public function result(){
- $value = $this->getValue();
- return ($value == 1) ? $this->label['yes'] : $this->label['no'];
- }
- }
|