Completed
Push — Recipes ( 630f49...c8afb0 )
by Laurent
12:15 queued 03:48
created

Install5Controller::step53Action()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Install5Controller Step 5 installation controller of the GLSR application.
4
 *
5
 * PHP Version 7
6
 *
7
 * @author    Quétier Laurent <[email protected]>
8
 * @copyright 2014 Dev-Int GLSR
9
 * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
10
 *
11
 * @version GIT: <git_id>
12
 *
13
 * @link      https://github.com/Dev-Int/glsr
14
 */
15
namespace App\Controller\Install;
16
17
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
18
use Symfony\Component\Routing\Annotation\Route;
19
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
20
use Symfony\Component\HttpFoundation\Request;
21
22
use App\Form\Type\Settings\Diverse\FamilyLogType;
23
use App\Form\Type\Settings\Diverse\ZoneStorageType;
24
use App\Form\Type\Settings\Diverse\UnitType;
25
use App\Form\Type\Settings\Diverse\TvaType;
26
27
/**
28
 * class InstallController
29
 *
30
 * @category Controller
31
 *
32
 * @Route("/install/step5")
33
 */
34
class Install5Controller extends InstallController
35
{
36
    /**
37
     * Step 5.1 of the installation.
38
     * Configuration of the application (Logistic family).
39
     *
40
     * @Route("/1", name="gs_install_st5_1")
41
     * @Method({"POST","GET"})
42
     * @Template("install/step5.html.twig")
43
     *
44
     * @param \Symfony\Component\HttpFoundation\Request $request Request form
45
     *
46
     * @return \Symfony\Component\HttpFoundation\RedirectResponse|string|array
47
     * <string,FamilyLog|\Symfony\Component\Form\FormView> Return of the page
48
     */
49
    public function step51Action(Request $request)
50
    {
51
        $return = $this->stepAction(
52
            $request,
53
            'Settings\Diverse\FamilyLog',
54
            '\App\Entity\Settings\Diverse\FamilyLog',
55
            FamilyLogType::class,
56
            '5_1'
57
        );
58
59
        return $return;
60
    }
61
62
    /**
63
     * Step 5.2 of the installation.
64
     * Configuration of the application (storage area).
65
     *
66
     * @Route("/2", name="gs_install_st5_2")
67
     * @Method({"POST","GET"})
68
     * @Template("install/step5.html.twig")
69
     *
70
     * @param \Symfony\Component\HttpFoundation\Request $request Request form
71
     *
72
     * @return \Symfony\Component\HttpFoundation\RedirectResponse|string|array
73
     * <string,ZoneStorage|\Symfony\Component\Form\FormView> Return of the page
74
     */
75
    public function step52Action(Request $request)
76
    {
77
        $return = $this->stepAction(
78
            $request,
79
            'Settings\Diverse\ZoneStorage',
80
            '\App\Entity\Settings\Diverse\ZoneStorage',
81
            ZoneStorageType::class,
82
            '5_2'
83
        );
84
85
        return $return;
86
    }
87
88
    /**
89
     * Step 5.3 of the installation.
90
     * Configuration of the application (Storage unit).
91
     *
92
     * @Route("/3", name="gs_install_st5_3")
93
     * @Method({"POST","GET"})
94
     * @Template("install/step5.html.twig")
95
     *
96
     * @param Symfony\Component\HttpFoundation\Request $request Request form
97
     *
98
     * @return \Symfony\Component\HttpFoundation\RedirectResponse|string|array
99
     * <string,UnitStorage|\Symfony\Component\Form\FormView> Return of the page
100
     */
101
    public function step53Action(Request $request)
102
    {
103
        $return = $this->stepAction(
104
            $request,
105
            'Settings\Diverse\Unit',
106
            '\App\Entity\Settings\Diverse\Unit',
107
            UnitType::class,
108
            '5_3'
109
        );
110
111
        return $return;
112
    }
113
114
    /**
115
     * Step 5.4 of the installation.
116
     * Configuration of the application (VAT rate.).
117
     *
118
     * @Route("/4", name="gs_install_st5_4")
119
     * @Method({"POST","GET"})
120
     * @Template("install/step5.html.twig")
121
     *
122
     * @param Symfony\Component\HttpFoundation\Request $request Request form
123
     *
124
     * @return \Symfony\Component\HttpFoundation\RedirectResponse|string|array
125
     * <string,Tva|\Symfony\Component\Form\FormView> Return of the page
126
     */
127
    public function step54Action(Request $request)
128
    {
129
        $return = $this->stepAction(
130
            $request,
131
            'Settings\Diverse\Tva',
132
            '\App\Entity\Settings\Diverse\Tva',
133
            TvaType::class,
134
            '5_4'
135
        );
136
137
        return $return;
138
    }
139
}
140