Completed
Push — master ( f41c31...89ac09 )
by Kentaro
22s
created

Version20160823172700   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 20 1
A down() 0 3 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