Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
144:19 queued 116:23
created

TwigUserFuncController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 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 Plugin\TwigUserFunc\Controller;
15
16
use Eccube\Annotation\Inject;
17
use Eccube\Application;
18
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
19
20
/**
21
 * @Route(service=TwigUserFuncController::class)
22
 */
23
class TwigUserFuncController
24
{
25
    /**
26
     * @Inject("twig")
27
     *
28
     * @var \Twig_Environment
29
     */
30
    protected $twig;
31
32
    /**
33
     * @Route("/twiguserfunc")
34
     */
35
    public function index(Application $app)
36
    {
37
        return $this->twig
38
            ->createTemplate("{{ eccube_block_hello({'name':'EC-CUBE'}) }}")
39
            ->render([]);
40
    }
41
}
42