Completed
Push — middleware-wip ( ffd957...48fd00 )
by Romain
02:53
created

StepItem   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 87
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 7
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 87
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getPageUid() 0 4 1
A getExtension() 0 4 1
A getController() 0 4 1
A getAction() 0 4 1
A getName() 0 8 2
A setName() 0 4 1
1
<?php
2
/*
3
 * 2017 Romain CANON <[email protected]>
4
 *
5
 * This file is part of the TYPO3 FormZ project.
6
 * It is free software; you can redistribute it and/or modify it
7
 * under the terms of the GNU General Public License, either
8
 * version 3 of the License, or any later version.
9
 *
10
 * For the full copyright and license information, see:
11
 * http://www.gnu.org/licenses/gpl-3.0.html
12
 */
13
14
namespace Romm\Formz\Configuration\Form\Step;
15
16
use Romm\ConfigurationObject\Traits\ConfigurationObject\StoreArrayIndexTrait;
17
use Romm\Formz\Configuration\AbstractFormzConfiguration;
18
19
class StepItem extends AbstractFormzConfiguration
20
{
21
    use StoreArrayIndexTrait;
22
23
    /**
24
     * @var int
25
     * @validate IntegerValidator
26
     * @validate Romm.Formz:PageExists
27
     */
28
    protected $pageUid;
29
30
    /**
31
     * @var string
32
     */
33
    protected $extension;
34
35
    /**
36
     * @var string
37
     */
38
    protected $controller;
39
40
    /**
41
     * @var string
42
     * @validate NotEmpty
43
     */
44
    protected $action;
45
46
    /**
47
     * Name of the step. By default, it is the key of this step in the array
48
     * containing all the steps for the parent form.
49
     *
50
     * @var string
51
     */
52
    private $name;
53
54
    /**
55
     * @return int
56
     */
57
    public function getPageUid()
58
    {
59
        return $this->pageUid;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getExtension()
66
    {
67
        return $this->extension;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getController()
74
    {
75
        return $this->controller;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getAction()
82
    {
83
        return $this->action;
84
    }
85
86
    /**
87
     * @return string
88
     */
89
    public function getName()
90
    {
91
        if (null === $this->name) {
92
            $this->name = $this->getArrayIndex();
93
        }
94
95
        return $this->name;
96
    }
97
98
    /**
99
     * @param string $name
100
     */
101
    public function setName($name)
102
    {
103
        $this->name = $name;
104
    }
105
}
106