1
|
|
|
<?php |
2
|
|
|
namespace EWW\Dpf\Domain\Model; |
3
|
|
|
|
4
|
|
|
/* |
5
|
|
|
* This file is part of the TYPO3 CMS project. |
6
|
|
|
* |
7
|
|
|
* It is free software; you can redistribute it and/or modify it under |
8
|
|
|
* the terms of the GNU General Public License, either version 2 |
9
|
|
|
* of the License, or any later version. |
10
|
|
|
* |
11
|
|
|
* For the full copyright and license information, please read the |
12
|
|
|
* LICENSE.txt file that was distributed with this source code. |
13
|
|
|
* |
14
|
|
|
* The TYPO3 project - inspiring people to share! |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* InputOptionList |
19
|
|
|
*/ |
20
|
|
|
class InputOptionList extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
|
|
|
|
21
|
|
|
{ |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* name |
25
|
|
|
* |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
protected $name = ''; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* displayName |
32
|
|
|
* |
33
|
|
|
* @var string |
34
|
|
|
*/ |
35
|
|
|
protected $displayName = ''; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* valueList |
39
|
|
|
* |
40
|
|
|
* @var string |
41
|
|
|
*/ |
42
|
|
|
protected $valueList = ''; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* valueLabelList |
46
|
|
|
* |
47
|
|
|
* @var string |
48
|
|
|
*/ |
49
|
|
|
protected $valueLabelList = ''; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* defaultValue |
53
|
|
|
* |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
protected $defaultValue = ''; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* __construct |
60
|
|
|
*/ |
61
|
|
|
public function __construct() |
62
|
|
|
{ |
63
|
|
|
|
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Returns the name |
68
|
|
|
* |
69
|
|
|
* @return string $name |
70
|
|
|
*/ |
71
|
|
|
public function getName() |
72
|
|
|
{ |
73
|
|
|
return $this->name; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Sets the name |
78
|
|
|
* |
79
|
|
|
* @param string $name |
80
|
|
|
* @return void |
81
|
|
|
*/ |
82
|
|
|
public function setName($name) |
83
|
|
|
{ |
84
|
|
|
$this->name = $name; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* Returns the displayName |
89
|
|
|
* |
90
|
|
|
* @return string $displayName |
91
|
|
|
*/ |
92
|
|
|
public function getDisplayName() |
93
|
|
|
{ |
94
|
|
|
return $this->displayName; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* Returns the valueList |
99
|
|
|
* |
100
|
|
|
* @return string $valueList |
101
|
|
|
*/ |
102
|
|
|
public function getValueList() |
103
|
|
|
{ |
104
|
|
|
return $this->valueList; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Sets the valueList |
109
|
|
|
* |
110
|
|
|
* @param string $valueList |
111
|
|
|
* @return void |
112
|
|
|
*/ |
113
|
|
|
public function setValueList($valueList) |
114
|
|
|
{ |
115
|
|
|
$this->valueList = $valueList; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* Returns the valueLabelList |
120
|
|
|
* |
121
|
|
|
* @return string $valueLabelList |
122
|
|
|
*/ |
123
|
|
|
public function getValueLabelList() |
124
|
|
|
{ |
125
|
|
|
return $this->valueLabelList; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Sets the valueLabelList |
130
|
|
|
* |
131
|
|
|
* @param string $valueLabelList |
132
|
|
|
* @return void |
133
|
|
|
*/ |
134
|
|
|
public function setValueLabelList($valueLabelList) |
135
|
|
|
{ |
136
|
|
|
$this->valueLabelList = $valueLabelList; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Sets the displayName |
141
|
|
|
* |
142
|
|
|
* @param string $displayName |
143
|
|
|
* @return void |
144
|
|
|
*/ |
145
|
|
|
public function setDisplayName($displayName) |
146
|
|
|
{ |
147
|
|
|
$this->displayName = $displayName; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* Returns the inputOptions |
152
|
|
|
* |
153
|
|
|
* @return array $inputOptions |
154
|
|
|
* @throws \Exception |
155
|
|
|
*/ |
156
|
|
|
public function getInputOptions() |
157
|
|
|
{ |
158
|
|
|
|
159
|
|
|
$values = explode("|", $this->getValueList()); |
160
|
|
|
$labels = explode("|", $this->getValueLabelList()); |
161
|
|
|
|
162
|
|
|
if (sizeof($values) != sizeof($labels)) { |
|
|
|
|
163
|
|
|
throw new \Exception('Invalid input option list configuration.'); |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
return array_combine($values, $labels); |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
public function setL10nParent($l10nParent) |
170
|
|
|
{ |
171
|
|
|
$this->l10nParent = $l10nParent; |
|
|
|
|
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
public function setSysLanguageUid($sysLanguageUid) |
175
|
|
|
{ |
176
|
|
|
$this->_languageUid = $sysLanguageUid; |
|
|
|
|
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* Returns the defaultValue |
181
|
|
|
* |
182
|
|
|
* @return string $defaultValue |
183
|
|
|
*/ |
184
|
|
|
public function getDefaultValue() |
185
|
|
|
{ |
186
|
|
|
return $this->defaultValue; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* Sets the defaultValue |
191
|
|
|
* |
192
|
|
|
* @param string $defaultValue |
193
|
|
|
* @return void |
194
|
|
|
*/ |
195
|
|
|
public function setDefaultValue($defaultValue) |
196
|
|
|
{ |
197
|
|
|
$this->defaultValue = $defaultValue; |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
} |
201
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths