/**
  * {@inheritdoc}
  */
 public function createApplication()
 {
     $app = new InstallApplication();
     //$app->initialize();
     //$app->initPluginEventDispatcher();
     $app['session.test'] = true;
     $app['exception_handler']->disable();
     $app->boot();
     return $app;
 }
Example #2
0
 /**
  * インストール済プラグインの一覧を表示する.
  * プラグインがインストールされていない場合は, マイグレーション実行画面へリダイレクトする.
  *
  * @param InstallApplication $app
  * @param Request $request
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function migration_plugin(InstallApplication $app, Request $request)
 {
     $eccube = new \Eccube\Application();
     $eccube->initDoctrine();
     $pluginRepository = $eccube['orm.em']->getRepository('Eccube\\Entity\\Plugin');
     $Plugins = $pluginRepository->findBy(array('del_flg' => Constant::DISABLED));
     if (empty($Plugins)) {
         // インストール済プラグインがない場合はマイグレーション実行画面へリダイレクト.
         return $app->redirect($app->url('migration_end'));
     } else {
         return $app['twig']->render('migration_plugin.twig', array('Plugins' => $Plugins, 'version' => Constant::VERSION));
     }
 }
Example #3
0
 public function step5(InstallApplication $app, Request $request)
 {
     $this->app = $app;
     $form = $app['form.factory']->createBuilder('install_step5')->getForm();
     $sessionData = $this->getSessionData($request);
     $form->setData($sessionData);
     if ($this->isValid($request, $form)) {
         if (!$form['no_update']->getData()) {
             set_time_limit(0);
             $this->setPDO()->dropTables()->createTables()->doMigrate()->insert();
         }
         if (isset($sessionData['agree']) && $sessionData['agree'] == '1') {
             $host = $request->getSchemeAndHttpHost();
             $basePath = $request->getBasePath();
             $params = array('http_url' => $host . $basePath, 'shop_name' => $sessionData['shop_name']);
             $this->sendAppData($params);
         }
         $this->addInstallStatus();
         $request->getSession()->remove(self::SESSION_KEY);
         return $app->redirect($app->url('install_complete'));
     }
     return $app['twig']->render('step5.twig', array('form' => $form->createView()));
 }
Example #4
0
 /**
  * インストール済プラグインの一覧を表示する.
  * プラグインがインストールされていない場合は, マイグレーション実行画面へリダイレクトする.
  *
  * @param InstallApplication $app
  * @param Request $request
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function migration_plugin(InstallApplication $app, Request $request)
 {
     $eccube = \Eccube\Application::getInstance();
     $eccube->initialize();
     $eccube->boot();
     $pluginRepository = $eccube['orm.em']->getRepository('Eccube\\Entity\\Plugin');
     $Plugins = $pluginRepository->findBy(array('del_flg' => Constant::DISABLED));
     if (empty($Plugins)) {
         // インストール済プラグインがない場合はマイグレーション実行画面へリダイレクト.
         return $app->redirect($app->url('migration_end'));
     } else {
         return $app['twig']->render('migration_plugin.twig', array('Plugins' => $Plugins, 'version' => Constant::VERSION, 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/'));
     }
 }