protected function respondSuccess($model)
    {
        if (Yii::$app->request->isAjax) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return [
                'success' => true
            ];
        }

        return $this->controller->redirect($this->createReturnUrl('view', $model));
    }
protected function respondSuccess($model)
    {
        if (Yii::$app->request->isAjax) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return [
                'success' => true
            ];
        }

        return $this->controller->redirect($this->createReturnUrl('view', $model));
    }
protected function respondSuccess ( $ model ) { if ( Yii :: $ app -> request -> isAjax ) { Yii :: $ app -> response -> format = Response :: FORMAT_JSON ; return [ 'success' => true ] ; } return $ this -> controller -> redirect ( $ this -> createReturnUrl ( 'view' , $ model ) ) ; }
Composes success response.
@param \yii\db\ActiveRecordInterface $model
@return mixed response.
Composes success response .