controllers/actions/ChangeStatusAction.php
public function run()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;

        $language = Language::findOne(Yii::$app->request->post('language_id', ''));
        if ($language !== null) {
            $language->status = Yii::$app->request->post('status', Language::STATUS_BETA);
            if ($language->validate()) {
                $language->save();
            }
        }

        return $language->getErrors();
    }
public function run()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;

        $language = Language::findOne(Yii::$app->request->post('language_id', ''));
        if ($language !== null) {
            $language->status = Yii::$app->request->post('status', Language::STATUS_BETA);
            if ($language->validate()) {
                $language->save();
            }
        }

        return $language->getErrors();
    }
public function run ( ) { Yii :: $ app -> response -> format = Response :: FORMAT_JSON ; $ language = Language :: findOne ( Yii :: $ app -> request -> post ( 'language_id' , '' ) ) ; if ( $ language !== null ) { $ language -> status = Yii :: $ app -> request -> post ( 'status' , Language :: STATUS_BETA ) ; if ( $ language -> validate ( ) ) { $ language -> save ( ) ; } } return $ language -> getErrors ( ) ; }
Modifying the state of language.

@return array
Modifying the state of language .