1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Loevgaard\DandomainFoundation\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
7
|
|
|
use Loevgaard\DandomainFoundation\Entity\Generated\VariantGroupInterface; |
|
|
|
|
8
|
|
|
use Loevgaard\DandomainFoundation\Entity\Generated\VariantGroupTrait; |
|
|
|
|
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @ORM\Entity() |
12
|
|
|
* @ORM\Table(name="ldf_variant_groups") |
13
|
|
|
*/ |
14
|
|
|
class VariantGroup extends AbstractEntity implements VariantGroupInterface |
15
|
|
|
{ |
16
|
|
|
use VariantGroupTrait; |
17
|
|
|
|
18
|
|
|
protected $hydrateConversions = [ |
19
|
|
|
'id' => 'externalId', |
20
|
|
|
]; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var int |
24
|
|
|
* |
25
|
|
|
* @ORM\Id |
26
|
|
|
* @ORM\GeneratedValue |
27
|
|
|
* @ORM\Column(type="integer") |
28
|
|
|
**/ |
29
|
|
|
protected $id; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @var int |
33
|
|
|
* |
34
|
|
|
* @ORM\Column(type="integer", unique=true) |
35
|
|
|
*/ |
36
|
|
|
protected $externalId; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string|null |
40
|
|
|
* |
41
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
42
|
|
|
*/ |
43
|
|
|
protected $groupName; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var string|null |
47
|
|
|
* |
48
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
49
|
|
|
*/ |
50
|
|
|
protected $headline; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @var string|null |
54
|
|
|
* |
55
|
|
|
* @ORM\Column(nullable=true, type="text") |
56
|
|
|
*/ |
57
|
|
|
protected $selectText; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @var int|null |
61
|
|
|
* |
62
|
|
|
* @ORM\Column(nullable=true, type="integer") |
63
|
|
|
*/ |
64
|
|
|
protected $siteId; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @var int|null |
68
|
|
|
* |
69
|
|
|
* @ORM\Column(nullable=true, type="integer") |
70
|
|
|
*/ |
71
|
|
|
protected $sortOrder; |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @var string|null |
75
|
|
|
* |
76
|
|
|
* @ORM\Column(nullable=true, type="text") |
77
|
|
|
*/ |
78
|
|
|
protected $text; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var int|null |
82
|
|
|
* |
83
|
|
|
* @ORM\Column(nullable=true, type="integer") |
84
|
|
|
*/ |
85
|
|
|
protected $variantType; |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @var Product[]|ArrayCollection |
89
|
|
|
* |
90
|
|
|
* @ORM\ManyToMany(mappedBy="variantGroups", targetEntity="Product") |
91
|
|
|
*/ |
92
|
|
|
protected $products; |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @var Variant[]|ArrayCollection |
96
|
|
|
*/ |
97
|
|
|
protected $variants; |
98
|
|
|
|
99
|
9 |
|
public function __construct() |
100
|
|
|
{ |
101
|
9 |
|
$this->products = new ArrayCollection(); |
102
|
9 |
|
$this->variants = new ArrayCollection(); |
103
|
9 |
|
} |
104
|
|
|
|
105
|
4 |
|
/** |
106
|
|
|
* @return int |
107
|
4 |
|
*/ |
108
|
2 |
|
public function getId(): int |
109
|
|
|
{ |
110
|
2 |
|
return (int) $this->id; |
111
|
|
|
} |
112
|
|
|
|
113
|
2 |
|
/** |
114
|
|
|
* @param int $id |
115
|
2 |
|
* |
116
|
|
|
* @return VariantGroupInterface |
117
|
2 |
|
*/ |
118
|
1 |
|
public function setId(int $id) |
119
|
|
|
{ |
120
|
5 |
|
$this->id = $id; |
121
|
|
|
|
122
|
5 |
|
return $this; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @return int |
127
|
|
|
*/ |
128
|
4 |
|
public function getExternalId(): int |
129
|
|
|
{ |
130
|
4 |
|
return (int) $this->externalId; |
131
|
|
|
} |
132
|
2 |
|
|
133
|
|
|
/** |
134
|
|
|
* @param int $externalId |
135
|
|
|
* |
136
|
|
|
* @return VariantGroupInterface |
137
|
|
|
*/ |
138
|
1 |
|
public function setExternalId(int $externalId) |
139
|
|
|
{ |
140
|
1 |
|
$this->externalId = $externalId; |
141
|
|
|
|
142
|
1 |
|
return $this; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @return null|string |
147
|
|
|
*/ |
148
|
|
|
public function getGroupName() |
149
|
|
|
{ |
150
|
|
|
return $this->groupName; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* @param null|string $groupName |
155
|
|
|
* |
156
|
|
|
* @return VariantGroupInterface |
157
|
|
|
*/ |
158
|
|
|
public function setGroupName($groupName) |
159
|
|
|
{ |
160
|
|
|
$this->groupName = $groupName; |
161
|
|
|
|
162
|
|
|
return $this; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* @return null|string |
167
|
|
|
*/ |
168
|
|
|
public function getHeadline() |
169
|
|
|
{ |
170
|
|
|
return $this->headline; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* @param null|string $headline |
175
|
|
|
* |
176
|
|
|
* @return VariantGroupInterface |
177
|
|
|
*/ |
178
|
2 |
|
public function setHeadline($headline) |
179
|
|
|
{ |
180
|
2 |
|
$this->headline = $headline; |
181
|
|
|
|
182
|
|
|
return $this; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* @return null|string |
187
|
|
|
*/ |
188
|
3 |
|
public function getSelectText() |
189
|
|
|
{ |
190
|
3 |
|
return $this->selectText; |
191
|
|
|
} |
192
|
2 |
|
|
193
|
|
|
/** |
194
|
|
|
* @param null|string $selectText |
195
|
|
|
* |
196
|
|
|
* @return VariantGroupInterface |
197
|
|
|
*/ |
198
|
3 |
|
public function setSelectText($selectText) |
199
|
|
|
{ |
200
|
3 |
|
$this->selectText = $selectText; |
201
|
|
|
|
202
|
1 |
|
return $this; |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* @return int|null |
207
|
|
|
*/ |
208
|
3 |
|
public function getSiteId() |
209
|
|
|
{ |
210
|
3 |
|
return $this->siteId; |
211
|
|
|
} |
212
|
2 |
|
|
213
|
|
|
/** |
214
|
|
|
* @param int|null $siteId |
215
|
|
|
* |
216
|
|
|
* @return VariantGroupInterface |
217
|
|
|
*/ |
218
|
3 |
|
public function setSiteId($siteId) |
219
|
|
|
{ |
220
|
3 |
|
$this->siteId = $siteId; |
221
|
|
|
|
222
|
1 |
|
return $this; |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
/** |
226
|
|
|
* @return int|null |
227
|
|
|
*/ |
228
|
3 |
|
public function getSortOrder() |
229
|
|
|
{ |
230
|
3 |
|
return $this->sortOrder; |
231
|
|
|
} |
232
|
2 |
|
|
233
|
|
|
/** |
234
|
|
|
* @param int|null $sortOrder |
235
|
|
|
* |
236
|
|
|
* @return VariantGroupInterface |
237
|
|
|
*/ |
238
|
3 |
|
public function setSortOrder($sortOrder) |
239
|
|
|
{ |
240
|
3 |
|
$this->sortOrder = $sortOrder; |
241
|
|
|
|
242
|
1 |
|
return $this; |
243
|
|
|
} |
244
|
|
|
|
245
|
|
|
/** |
246
|
|
|
* @return null|string |
247
|
|
|
*/ |
248
|
3 |
|
public function getText() |
249
|
|
|
{ |
250
|
3 |
|
return $this->text; |
251
|
|
|
} |
252
|
2 |
|
|
253
|
|
|
/** |
254
|
|
|
* @param null|string $text |
255
|
|
|
* |
256
|
|
|
* @return VariantGroupInterface |
257
|
|
|
*/ |
258
|
1 |
|
public function setText($text) |
259
|
|
|
{ |
260
|
1 |
|
$this->text = $text; |
261
|
|
|
|
262
|
1 |
|
return $this; |
263
|
|
|
} |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* @return int|null |
267
|
|
|
*/ |
268
|
|
|
public function getVariantType() |
269
|
|
|
{ |
270
|
|
|
return $this->variantType; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
/** |
274
|
|
|
* @param int|null $variantType |
275
|
|
|
* |
276
|
|
|
* @return VariantGroupInterface |
277
|
|
|
*/ |
278
|
|
|
public function setVariantType($variantType) |
279
|
|
|
{ |
280
|
|
|
$this->variantType = $variantType; |
281
|
|
|
|
282
|
|
|
return $this; |
283
|
|
|
} |
284
|
|
|
|
285
|
|
|
/** |
286
|
|
|
* @return ArrayCollection|Product[] |
287
|
|
|
*/ |
288
|
|
|
public function getProducts() |
289
|
|
|
{ |
290
|
|
|
return $this->products; |
291
|
|
|
} |
292
|
|
|
|
293
|
|
|
/** |
294
|
|
|
* @param ArrayCollection|Product[] $products |
295
|
|
|
* |
296
|
|
|
* @return VariantGroupInterface |
297
|
|
|
*/ |
298
|
|
|
public function setProducts($products) |
299
|
|
|
{ |
300
|
|
|
$this->products = $products; |
301
|
|
|
|
302
|
|
|
return $this; |
303
|
|
|
} |
304
|
|
|
|
305
|
|
|
/** |
306
|
|
|
* @return ArrayCollection|Variant[] |
307
|
|
|
*/ |
308
|
|
|
public function getVariants() |
309
|
|
|
{ |
310
|
|
|
return $this->variants; |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* @param ArrayCollection|Variant[] $variants |
315
|
|
|
* |
316
|
|
|
* @return VariantGroupInterface |
317
|
|
|
*/ |
318
|
|
|
public function setVariants($variants) |
319
|
|
|
{ |
320
|
|
|
$this->variants = $variants; |
321
|
|
|
|
322
|
|
|
return $this; |
323
|
|
|
} |
324
|
|
|
} |
325
|
|
|
|
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