| @@ 10-42 (lines=33) @@ | ||
| 7 | use Doctrine\ORM\EntityManager; |
|
| 8 | use Eccube\Entity\PageLayout; |
|
| 9 | ||
| 10 | class Version20160823172700 extends AbstractMigration |
|
| 11 | { |
|
| 12 | /** |
|
| 13 | * @param Schema $schema |
|
| 14 | */ |
|
| 15 | public function up(Schema $schema) |
|
| 16 | { |
|
| 17 | $app = \Eccube\Application::getInstance(); |
|
| 18 | /** @var EntityManager $em */ |
|
| 19 | $em = $app["orm.em"]; |
|
| 20 | ||
| 21 | $DeviceType = $app['eccube.repository.master.device_type']->find(10); |
|
| 22 | ||
| 23 | $PageLayout = new PageLayout(); |
|
| 24 | $PageLayout |
|
| 25 | ->setDeviceType($DeviceType) |
|
| 26 | ->setName('MYページ/お届け先編集') |
|
| 27 | ->setUrl('mypage_delivery_edit') |
|
| 28 | ->setFileName('Mypage/delivery_edit') |
|
| 29 | ->setEditFlg(2) |
|
| 30 | ->setMetaRobots('noindex'); |
|
| 31 | $em->persist($PageLayout); |
|
| 32 | ||
| 33 | $em->flush(); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param Schema $schema |
|
| 38 | */ |
|
| 39 | public function down(Schema $schema) |
|
| 40 | { |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||
| @@ 10-44 (lines=35) @@ | ||
| 7 | use Doctrine\ORM\EntityManager; |
|
| 8 | use Eccube\Entity\PageLayout; |
|
| 9 | ||
| 10 | class Version20170222120000 extends AbstractMigration |
|
| 11 | { |
|
| 12 | ||
| 13 | /** |
|
| 14 | * @param Schema $schema |
|
| 15 | */ |
|
| 16 | public function up(Schema $schema) |
|
| 17 | { |
|
| 18 | $app = \Eccube\Application::getInstance(); |
|
| 19 | /** @var EntityManager $em */ |
|
| 20 | $em = $app["orm.em"]; |
|
| 21 | ||
| 22 | $DeviceType = $app['eccube.repository.master.device_type']->find(10); |
|
| 23 | ||
| 24 | $PageLayout = new PageLayout(); |
|
| 25 | $PageLayout |
|
| 26 | ->setDeviceType($DeviceType) |
|
| 27 | ->setName('商品購入/確認') |
|
| 28 | ->setUrl('shopping_confirm') |
|
| 29 | ->setFileName('Shopping/confirm') |
|
| 30 | ->setEditFlg(2) |
|
| 31 | ->setMetaRobots('noindex'); |
|
| 32 | $em->persist($PageLayout); |
|
| 33 | ||
| 34 | $em->flush(); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param Schema $schema |
|
| 39 | */ |
|
| 40 | public function down(Schema $schema) |
|
| 41 | { |
|
| 42 | ||
| 43 | } |
|
| 44 | } |
|
| 45 | ||