public function actionUpdateParam(int $id, int $languageId)
    {
        if (!empty($id) && !empty($languageId)) {
            $paramTranslation = ParamTranslation::find()
                ->where(['param_id' => $id, 'language_id' => $languageId])->one();

            if (empty($paramTranslation)) {
                $paramTranslation = new ParamTranslation();
                $paramTranslation->param_id = $id;
                $paramTranslation->language_id = $languageId;
            }

            if (Yii::$app->request->isPost) {
                $paramTranslation->load(Yii::$app->request->post());
                if ($paramTranslation->validate()) {
                    $paramTranslation->save();

                    $this->trigger(self::EVENT_AFTER_EDIT_PRODUCT, new ProductEvent([
                        'id' => $paramTranslation->param->product_id
                    ]));

                    Yii::$app->getSession()->setFlash('success', 'Data were successfully modified.');
                } else {
                    Yii::$app->getSession()->setFlash('danger', 'Failed to change the record.');
                }

                return $this->redirect(['add-param', 'id' => $paramTranslation->param->product_id, 'languageId' => $languageId,]);
            }

            return $this->renderPartial('update-param', [
                'paramTranslation' => $paramTranslation,
                'languageId' => $languageId
            ]);
        } else throw new NotFoundHttpException();
    }