These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminBundle\Event; |
||
4 | |||
5 | use Kunstmaan\AdminBundle\Helper\FormWidgets\Tabs\TabPane; |
||
6 | use Symfony\Component\EventDispatcher\Event; |
||
7 | use Symfony\Component\HttpFoundation\Request; |
||
8 | |||
9 | /** |
||
10 | * Class AdaptSimpleFormEvent |
||
11 | */ |
||
12 | class AdaptSimpleFormEvent extends Event |
||
0 ignored issues
–
show
|
|||
13 | { |
||
14 | /** |
||
15 | * @var Request |
||
16 | */ |
||
17 | protected $request; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $formType; |
||
23 | |||
24 | /** |
||
25 | * @var TabPane |
||
26 | */ |
||
27 | protected $tabPane; |
||
28 | |||
29 | /** |
||
30 | * @var |
||
31 | */ |
||
32 | protected $data; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $options = []; |
||
38 | |||
39 | /** |
||
40 | * @param string $formType |
||
41 | * @param $data |
||
42 | */ |
||
43 | 1 | public function __construct(Request $request, $formType, $data, $options = []) |
|
44 | { |
||
45 | 1 | $this->request = $request; |
|
46 | 1 | $this->formType = $formType; |
|
47 | 1 | $this->data = $data; |
|
48 | 1 | $this->options = $options; |
|
49 | 1 | } |
|
50 | |||
51 | /** |
||
52 | * @return TabPane |
||
53 | */ |
||
54 | 1 | public function getTabPane() |
|
55 | { |
||
56 | 1 | return $this->tabPane; |
|
57 | } |
||
58 | |||
59 | 1 | public function setTabPane(TabPane $tabPane) |
|
60 | { |
||
61 | 1 | $this->tabPane = $tabPane; |
|
62 | 1 | } |
|
63 | |||
64 | /** |
||
65 | * @return Request |
||
66 | */ |
||
67 | 1 | public function getRequest() |
|
68 | { |
||
69 | 1 | return $this->request; |
|
70 | } |
||
71 | |||
72 | 1 | public function setRequest(Request $request) |
|
0 ignored issues
–
show
You have injected the Request via parameter
$request . This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest() .
Loading history...
|
|||
73 | { |
||
74 | 1 | $this->request = $request; |
|
75 | 1 | } |
|
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | 1 | public function getFormType() |
|
81 | { |
||
82 | 1 | return $this->formType; |
|
83 | } |
||
84 | |||
85 | /** |
||
86 | * @param string $type |
||
87 | */ |
||
88 | 1 | public function setFormType($type) |
|
89 | { |
||
90 | 1 | $this->formType = $type; |
|
91 | 1 | } |
|
92 | |||
93 | /** |
||
94 | * @return mixed |
||
95 | */ |
||
96 | 1 | public function getData() |
|
97 | { |
||
98 | 1 | return $this->data; |
|
99 | } |
||
100 | |||
101 | /** |
||
102 | * @param $data |
||
103 | */ |
||
104 | 1 | public function setData($data) |
|
105 | { |
||
106 | 1 | $this->data = $data; |
|
107 | 1 | } |
|
108 | |||
109 | /** |
||
110 | * @return array |
||
111 | */ |
||
112 | 1 | public function getOptions() |
|
113 | { |
||
114 | 1 | return $this->options; |
|
115 | } |
||
116 | |||
117 | /** |
||
118 | * @param $options |
||
119 | */ |
||
120 | 1 | public function setOptions($options) |
|
121 | { |
||
122 | 1 | $this->options = $options; |
|
123 | 1 | } |
|
124 | } |
||
125 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.