Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
48:27
created

AController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Acme\Controller;
15
16
use Eccube\Application;
17
use Symfony\Component\HttpFoundation\Request;
18
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
19
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
20
21
/**
22
 * @Route("/test")
23
 * @Template("test/index.twig")
24
 */
25
class AController
26
{
27
    /**
28
     * @Route("/initialize/{id}", requirements={"id" = "\d+"})
29
     */
30
    public function initialize(Application $app, Request $request, $id = 0)
31
    {
32
        dump('A: initialize');
33
        $t = new \Eccube\Entity\Csv();
34
        $t->setDispName($id + 100000);
35
        $app['request_scope']->set('csv', $t);
36
37
        return $app->forward('/test/new', ['param_init' => $id]);
38
    }
39
}
40