Passed
Push — master ( 5f442d...5e8f10 )
by Žilvinas
03:02
created

TemplatingController::forLoopAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 20
rs 9.4285
cc 1
eloc 14
nc 1
nop 0
1
<?php
2
namespace AppBundle\Controller;
3
4
use AppBundle\Entity\Task;
5
use AppBundle\Form\TaskType;
6
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
use Symfony\Component\Form\Extension\Core\Type\DateType;
8
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
9
use Symfony\Component\Form\Extension\Core\Type\TextType;
10
use Symfony\Component\HttpFoundation\Request;
11
use Symfony\Component\Routing\Annotation\Route;
12
13
/**
14
 * @Route("/templating")
15
 */
16
class TemplatingController extends Controller
17
{
18
    /**
19
     * @Route("/includes", name="templating_includes")
20
     */
21
    public function includesAction()
22
    {
23
        return $this->render(
24
            'templating/includes.html.twig',
25
            [
26
                'name' => 'Raccoon'
27
            ]
28
        );
29
    }
30
31
    /**
32
     * @Route("/includes/with-no-context", name="templating_includes_with_no_context")
33
     */
34
    public function includesWithNoContextAction()
35
    {
36
        return $this->render(
37
            'templating/includes-with-no-context.html.twig',
38
            [
39
                'name' => 'Raccoon'
40
            ]
41
        );
42
    }
43
44
    /**
45
     * @Route("/for-loop", name="templating_for_loop")
46
     */
47
    public function forLoopAction()
48
    {
49
        return $this->render(
50
            'templating/for-loop.html.twig',
51
            [
52
                'list' => [
53
                    'one',
54
                    'two',
55
                    'three',
56
                    'four',
57
                    'five',
58
                    'six',
59
                    'seven',
60
                    'eight',
61
                    'nine',
62
                    'ten'
63
                ]
64
            ]
65
        );
66
    }
67
68
}