示例#1
0
 public function getDataCellValue($model, $key, $index)
 {
     $value = parent::getDataCellValue($model, $key, $index);
     if (array_key_exists($value, $this->items)) {
         return $this->items[$value];
     }
     return $value;
 }
示例#2
0
 public function getDataCellValue($model, $key, $index)
 {
     return SwitchInput::widget(ArrayHelper::merge(['name' => 'swc' . $key . $model->id, 'pluginOptions' => ArrayHelper::merge($this->pluginOptions, ['state' => (bool) parent::getDataCellValue($model, $key, $index)])], $this->switchInputOptions));
 }