skeeks\cms\controllers\AdminCmsTreeTypePropertyController::update PHP Method

update() public method

public update ( )
    public function update()
    {
        $rr = new RequestResponse();
        $model = $this->model;
        if ($post = \Yii::$app->request->post()) {
            $model->load($post);
        }
        $handler = $model->handler;
        if ($handler) {
            if ($post = \Yii::$app->request->post()) {
                $handler->load($post);
            }
        }
        if ($rr->isRequestPjaxPost()) {
            if (!\Yii::$app->request->post($this->notSubmitParam)) {
                if ($rr->isRequestPjaxPost()) {
                    $model->component_settings = $handler->toArray();
                    $handler->load(\Yii::$app->request->post());
                    if ($model->load(\Yii::$app->request->post()) && $model->validate() && $handler->validate()) {
                        $model->save();
                        \Yii::$app->getSession()->setFlash('success', \Yii::t('skeeks/cms', 'Saved'));
                        if (\Yii::$app->request->post('submit-btn') == 'apply') {
                        } else {
                            return $this->redirect($this->indexUrl);
                        }
                        $model->refresh();
                    }
                }
            }
        }
        return $this->render('_form', ['model' => $model, 'handler' => $handler]);
    }
AdminCmsTreeTypePropertyController