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

RoutingTestController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2
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 Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
18
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
19
20
class RoutingTestController
21
{
22
    /**
23
     * // シングルコーテーションは読めないので注意.
24
     *
25
     * @Route("/{_admin}/test", name="admin_test")
26
     * @Security("has_role('ROLE_ADMIN')")
27
     *
28
     * @param Application $app
29
     *
30
     * @return \Symfony\Component\HttpFoundation\Response
31
     */
32
    public function testAdmin(Application $app)
33
    {
34
        return '管理画面のルーティングは, /{_admin}/xxx を指定します.';
35
    }
36
37
    /**
38
     * @Route("/{_user_data}/test")
39
     *
40
     * @param Application $app
41
     *
42
     * @return string
43
     */
44
    public function testUserData(Application $app)
45
    {
46
        return 'UserDataのルーティングは, /{_user_data}/xxx を指定します';
47
    }
48
}
49