public function actionUpdate($id)
{
$model = Language::model()->findByPk($id);
if (!is_object($model)) {
throw new CException("Specified language doesn't exists.");
return;
}
if (isset($_POST['Language'])) {
$model->attributes = $_POST['Language'];
if ($model->validate() && $model->save()) {
$this->redirect(array('index'));
}
}
$statusOptions = array(0 => Yii::t('common', 'Disabled'), 1 => Yii::t('common', 'Enabled'));
$this->render('update', array('model' => $model, 'statusOptions' => $statusOptions));
}