Beispiel #1
2
 public function createApplication()
 {
     $app = new \Eccube\Application();
     $app->initialize();
     $app->initializePlugin();
     $app->boot();
     $paths = array();
     $paths[] = $app['config']['template_admin_realdir'];
     $paths[] = $app['config']['template_realdir'];
     $paths[] = $app['config']['template_default_realdir'];
     $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
     $app['admin'] = true;
     $app['front'] = true;
     return $app;
 }
 /**
  * @param Schema $schema
  */
 public function up(Schema $schema)
 {
     // this up() migration is auto-generated, please modify it to your needs
     // pageを追加
     $app = new \Eccube\Application();
     $app->initialize();
     $app->boot();
     $em = $app['orm.em'];
     $DeviceType = $app['eccube.repository.master.device_type']->find(10);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/配送方法選択');
     $PageLayout->setUrl('shopping_delivery');
     $PageLayout->setFileName('Shopping/index');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/支払方法選択');
     $PageLayout->setUrl('shopping_payment');
     $PageLayout->setFileName('Shopping/index');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/お届け先変更');
     $PageLayout->setUrl('shopping_shipping_change');
     $PageLayout->setFileName('Shopping/index');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/お届け先変更');
     $PageLayout->setUrl('shopping_shipping_edit_change');
     $PageLayout->setFileName('Shopping/index');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/お届け先の複数指定');
     $PageLayout->setUrl('shopping_shipping_multiple_change');
     $PageLayout->setFileName('Shopping/index');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $em->flush();
 }
 /**
  * @param Schema $schema
  */
 public function up(Schema $schema)
 {
     // this up() migration is auto-generated, please modify it to your needs
     if (!$schema->hasTable(self::NAME)) {
         return true;
     }
     $app = new \Eccube\Application();
     $app->initialize();
     $app->boot();
     $em = $app["orm.em"];
     /*
     $CsvType = new CsvType();
     $CsvType->setId(1);
     $CsvType->setName('商品CSV');
     $CsvType->setRank(3);
     $em->persist($CsvType);
     
     $CsvType = new CsvType();
     $CsvType->setId(2);
     $CsvType->setName('会員CSV');
     $CsvType->setRank(4);
     $em->persist($CsvType);
     
     $CsvType = new CsvType();
     $CsvType->setId(3);
     $CsvType->setName('受注CSV');
     $CsvType->setRank(1);
     $em->persist($CsvType);
     
     $CsvType = new CsvType();
     $CsvType->setId(4);
     $CsvType->setName('配送CSV');
     $CsvType->setRank(2);
     $em->persist($CsvType);
     
     $CsvType = new CsvType();
     $CsvType->setId(5);
     $CsvType->setName('カテゴリCSV');
     $CsvType->setRank(5);
     $em->persist($CsvType);
     
     $em->flush();
     */
 }
 /**
  * @param Schema $schema
  */
 public function up(Schema $schema)
 {
     // this up() migration is auto-generated, please modify it to your needs
     // pageを追加
     $app = new \Eccube\Application();
     $app->initialize();
     $app->boot();
     $em = $app['orm.em'];
     $DeviceType = $app['eccube.repository.master.device_type']->find(10);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/お届け先の追加');
     $PageLayout->setUrl('shopping_shipping_edit');
     $PageLayout->setFileName('Shopping/shipping_edit');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/お届け先の複数指定(お届け先の追加)');
     $PageLayout->setUrl('shopping_shipping_multiple_edit');
     $PageLayout->setFileName('Shopping/shipping_multiple_edit');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('商品購入/購入エラー');
     $PageLayout->setUrl('shopping_error');
     $PageLayout->setFileName('Shopping/shopping_error');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('ご利用ガイド');
     $PageLayout->setUrl('help_guide');
     $PageLayout->setFileName('Help/guide');
     $PageLayout->setEditFlg(2);
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('パスワード再発行(入力ページ)');
     $PageLayout->setUrl('forgot');
     $PageLayout->setFileName('Forgot/index');
     $PageLayout->setEditFlg(2);
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('パスワード再発行(完了ページ)');
     $PageLayout->setUrl('forgot_complete');
     $PageLayout->setFileName('Forgot/complete');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('パスワード変更((完了ページ)');
     $PageLayout->setUrl('forgot_reset');
     $PageLayout->setFileName('Forgot/reset');
     $PageLayout->setEditFlg(2);
     $PageLayout->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $em->flush();
     // 文言、URLの修正
     $this->addSql("UPDATE dtb_page_layout  SET url = 'help_agreement', file_name = 'Help/agreement' WHERE file_name = 'Entry/kiyaku';");
     $this->addSql("UPDATE dtb_page_layout  SET url = 'shopping_shipping_multiple', file_name = 'Shopping/shipping_multiple' WHERE file_name = 'Shopping/multiple';");
     $this->addSql("UPDATE dtb_page_layout  SET page_name = '商品購入' WHERE page_name = '商品購入/ログイン';");
     $this->addSql("UPDATE dtb_page_layout  SET page_name = 'MYページ/お届け先一覧' WHERE page_name = 'MYページ/お届け先変更';");
     $this->addSql("UPDATE dtb_page_layout  SET file_name = 'Mypage/delivery_edit' WHERE page_name = 'MYページ/お届け先追加';");
     // 不要なレコードを削除
     $this->addSql("DELETE from dtb_page_layout  WHERE file_name = 'Shopping/payment';");
     $this->addSql("DELETE from dtb_page_layout  WHERE file_name = 'Shopping/confirm';");
 }
 /**
  * マイグレーションを実行し, 完了画面を表示させる
  *
  * @param InstallApplication $app
  * @param Request $request
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function migration_end(InstallApplication $app, Request $request)
 {
     $this->doMigrate();
     $config_app = new \Eccube\Application();
     // install用のappだとconfigが取れないので
     $config_app->initialize();
     $config_app->boot();
     \Eccube\Util\Cache::clear($config_app, true);
     return $app['twig']->render('migration_end.twig');
 }
Beispiel #6
0
if (isset($_SERVER['HTTP_CLIENT_IP'])
    || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
    || !in_array(@$_SERVER['REMOTE_ADDR'], $allow)
) {
    header('HTTP/1.0 403 Forbidden');
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
*/
require_once __DIR__ . '/../autoload.php';
Debug::enable();
// load configs.
$app = new Eccube\Application();
// debug enable.
$app['debug'] = true;
// initialize servicies.
$app->initialize();
$app->initializePlugin();
// load config dev
$conf = $app['config'];
$app['config'] = $app->share(function () use($conf) {
    $confarray = array();
    $config_dev_file = __DIR__ . '/../app/config/eccube/config_dev.yml';
    if (file_exists($config_dev_file)) {
        $config_dev = Yaml::parse(file_get_contents($config_dev_file));
        if (isset($config_dev)) {
            $confarray = array_replace_recursive($confarray, $config_dev);
        }
    }
    return array_replace_recursive($conf, $confarray);
});
// config_dev.ymlにmailが設定されていた場合、config_dev.ymlの設定内容を反映
Beispiel #7
0
 /**
  * マイグレーションを実行し, 完了画面を表示させる
  *
  * @param InstallApplication $app
  * @param Request $request
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function migration_end(InstallApplication $app, Request $request)
 {
     $this->doMigrate();
     $config_app = new \Eccube\Application();
     // install用のappだとconfigが取れないので
     $config_app->initialize();
     $config_app->boot();
     \Eccube\Util\Cache::clear($config_app, true);
     return $app['twig']->render('migration_end.twig', array('publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/'));
 }
 protected function deletePageLayout()
 {
     if (version_compare(\Eccube\Common\Constant::VERSION, '3.0.8', '<=')) {
         $app = new \Eccube\Application();
         $app->initialize();
         $app->boot();
     } else {
         $app = \Eccube\Application::getInstance();
     }
     $em = $app['orm.em'];
     /** @var $repos \Eccube\Repository\PageLayoutRepository */
     $repos = $em->getRepository('Eccube\\Entity\\PageLayout');
     $DeviceType = $app['eccube.repository.master.device_type']->find(DeviceType::DEVICE_TYPE_PC);
     $PageLayout = $this->findPageLayout($repos, $DeviceType, 'products_detail_review');
     $em->remove($PageLayout);
     $PageLayout = $this->findPageLayout($repos, $DeviceType, 'products_detail_review_complete');
     $em->remove($PageLayout);
     $PageLayout = $this->findPageLayout($repos, $DeviceType, 'products_detail_review_error');
     $em->remove($PageLayout);
     $em->flush();
 }