Ejemplo n.º 1
0
 /**
  * @param Schema $schema
  */
 public function up(Schema $schema)
 {
     $app = \Eccube\Application::getInstance();
     /** @var EntityManager $em */
     $em = $app["orm.em"];
     $DeviceType = $app['eccube.repository.master.device_type']->find(10);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType)->setName('MYページ/お届け先編集')->setUrl('mypage_delivery_edit')->setFileName('Mypage/delivery_edit')->setEditFlg(2)->setMetaRobots('noindex');
     $em->persist($PageLayout);
     $em->flush();
 }
Ejemplo n.º 2
0
 public function test_routing_AdminContentPage_delete_flg_user()
 {
     $redirectUrl = $this->app->url('admin_content_page');
     $DeviceType = $this->app['eccube.repository.master.device_type']->find(DeviceType::DEVICE_TYPE_PC);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setEditFlg(PageLayout::EDIT_FLG_USER);
     $PageLayout->setUrl('hogehoge');
     $this->app['orm.em']->persist($PageLayout);
     $this->app['orm.em']->flush();
     $this->client->request('DELETE', $this->app->url('admin_content_page_delete', array('id' => $PageLayout->getId())));
     $this->assertTrue($this->client->getResponse()->isRedirect($redirectUrl));
 }
Ejemplo n.º 3
0
 public function test_routing_AdminContentPage_delete()
 {
     $redirectUrl = $this->app->url('admin_content_page');
     $DeviceType = $this->app['eccube.repository.master.device_type']->find(DeviceType::DEVICE_TYPE_PC);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setEditFlg(PageLayout::EDIT_FLG_USER);
     $PageLayout->setUrl('dummy');
     $this->app['orm.em']->persist($PageLayout);
     $this->app['orm.em']->flush();
     $this->client->request('DELETE', $this->app->url('admin_content_page_delete', array('id' => $PageLayout->getId())));
     $this->assertTrue($this->client->getResponse()->isRedirect($redirectUrl));
     $hookpoints = array(EccubeEvents::ADMIN_CONTENT_PAGE_DELETE_COMPLETE);
     $this->verifyOutputString($hookpoints);
 }
Ejemplo n.º 4
0
 public function setUp()
 {
     parent::setUp();
     $root = vfsStream::setup('rootDir');
     vfsStream::newDirectory('user_data');
     // 一旦別の変数に代入しないと, config 以下の値を書きかえることができない
     $config = $this->app['config'];
     $config['template_default_realdir'] = vfsStream::url('rootDir');
     $config['user_data_realdir'] = $config['template_default_realdir'] . '/user_data';
     mkdir($config['user_data_realdir']);
     $this->app['config'] = $config;
     $this->DeviceType = $this->app['orm.em']->getRepository('Eccube\\Entity\\Master\\DeviceType')->find(DeviceType::DEVICE_TYPE_PC);
     $PageLayout = new PageLayout();
     $PageLayout->setUrl($this->fileName)->setFileName($this->fileName)->setDeviceType($this->DeviceType)->setEditFlg(PageLayout::EDIT_FLG_USER);
     $this->app['orm.em']->persist($PageLayout);
     $this->app['orm.em']->flush();
 }
Ejemplo n.º 5
0
 /**
  * @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();
 }
Ejemplo n.º 6
0
 /**
  * @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';");
 }
Ejemplo n.º 7
0
 public function newPageLayout(DeviceType $DeviceType)
 {
     $PageLayout = new \Eccube\Entity\PageLayout();
     $PageLayout->setDeviceType($DeviceType)->setEditFlg(PageLayout::EDIT_FLG_USER);
     return $PageLayout;
 }
 protected function createPageLayout()
 {
     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'];
     $DeviceType = $app['eccube.repository.master.device_type']->find(DeviceType::DEVICE_TYPE_PC);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('お客様の声書き込み');
     $PageLayout->setUrl('products_detail_review');
     $PageLayout->setMetaRobots('noindex');
     $PageLayout->setEditFlg(PageLayout::EDIT_FLG_DEFAULT);
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('お客様の声書き込み完了');
     $PageLayout->setUrl('products_detail_review_complete');
     $PageLayout->setMetaRobots('noindex');
     $PageLayout->setEditFlg(PageLayout::EDIT_FLG_DEFAULT);
     $em->persist($PageLayout);
     $PageLayout = new PageLayout();
     $PageLayout->setDeviceType($DeviceType);
     $PageLayout->setName('お客様の声書き込みエラー');
     $PageLayout->setUrl('products_detail_review_error');
     $PageLayout->setMetaRobots('noindex');
     $PageLayout->setEditFlg(PageLayout::EDIT_FLG_DEFAULT);
     $em->persist($PageLayout);
     $em->flush();
 }