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; }
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)); }