示例#1
0
 public function actionAppbox()
 {
     $executeInstallation = Yii::$app->request->post('type') === 'launch';
     $installationManager = new InstallationManager();
     $appInstallationResponse = $installationManager->checkAppInstallation($executeInstallation);
     if ($executeInstallation === FALSE) {
         if ($appInstallationResponse === FALSE) {
             \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
             return FALSE;
         }
         return $this->renderAjax('app_installation_box', ['title' => $appInstallationResponse->getData()]);
     } else {
         \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
         return $appInstallationResponse->toArray();
     }
 }
示例#2
0
 public function launchInstallation()
 {
     $installationManager = new InstallationManager();
     return $installationManager->execute();
 }