Version20160823172700::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 14
nc 1
nop 1
1
<?php
2
3
namespace DoctrineMigrations;
4
5
use Doctrine\DBAL\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
use Doctrine\ORM\EntityManager;
8
use Eccube\Entity\PageLayout;
9
10
class Version20160823172700 extends AbstractMigration
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
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