1
|
|
|
<?php |
2
|
|
|
namespace DERHANSEN\SfEventMgt\Domain\Model\Dto; |
3
|
|
|
|
4
|
|
|
/* |
5
|
|
|
* This file is part of the Extension "sf_event_mgt" for TYPO3 CMS. |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please read the |
8
|
|
|
* LICENSE.txt file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Event demand |
13
|
|
|
* |
14
|
|
|
* @author Torben Hansen <[email protected]> |
15
|
|
|
*/ |
16
|
|
|
class EventDemand extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* Display mode |
20
|
|
|
* |
21
|
|
|
* @var string |
22
|
|
|
*/ |
23
|
|
|
protected $displayMode = 'all'; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Storage page |
27
|
|
|
* |
28
|
|
|
* @var string |
29
|
|
|
*/ |
30
|
|
|
protected $storagePage = ''; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Current DateTime |
34
|
|
|
* |
35
|
|
|
* @var \DateTime |
36
|
|
|
*/ |
37
|
|
|
protected $currentDateTime = null; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Category |
41
|
|
|
* |
42
|
|
|
* @var string |
43
|
|
|
*/ |
44
|
|
|
protected $category; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Include subcategories |
48
|
|
|
* |
49
|
|
|
* @var bool |
50
|
|
|
*/ |
51
|
|
|
protected $includeSubcategories = false; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Category Conjunction |
55
|
|
|
* |
56
|
|
|
* @var string |
57
|
|
|
*/ |
58
|
|
|
protected $categoryConjunction = ''; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Top event |
62
|
|
|
* |
63
|
|
|
* @var int |
64
|
|
|
*/ |
65
|
|
|
protected $topEventRestriction = 0; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Order field |
69
|
|
|
* |
70
|
|
|
* @var string |
71
|
|
|
*/ |
72
|
|
|
protected $orderField = ''; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* Allowed order fields |
76
|
|
|
* |
77
|
|
|
* @var string |
78
|
|
|
*/ |
79
|
|
|
protected $orderFieldAllowed = ''; |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* Order direction |
83
|
|
|
* |
84
|
|
|
* @var string |
85
|
|
|
*/ |
86
|
|
|
protected $orderDirection = ''; |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Query limit |
90
|
|
|
* |
91
|
|
|
* @var int |
92
|
|
|
*/ |
93
|
|
|
protected $queryLimit = null; |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Location |
97
|
|
|
* |
98
|
|
|
* @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
99
|
|
|
*/ |
100
|
|
|
protected $location = null; |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* Speaker |
104
|
|
|
* |
105
|
|
|
* @var \DERHANSEN\SfEventMgt\Domain\Model\Speaker |
106
|
|
|
*/ |
107
|
|
|
protected $speaker = null; |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* City for location |
111
|
|
|
* |
112
|
|
|
* @var string |
113
|
|
|
*/ |
114
|
|
|
protected $locationCity = ''; |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* Country for location |
118
|
|
|
* |
119
|
|
|
* @var string |
120
|
|
|
*/ |
121
|
|
|
protected $locationCountry = ''; |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* Year |
125
|
|
|
* |
126
|
|
|
* @var int |
127
|
|
|
*/ |
128
|
|
|
protected $year; |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Month |
132
|
|
|
* |
133
|
|
|
* @var int |
134
|
|
|
*/ |
135
|
|
|
protected $month; |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* Day |
139
|
|
|
* |
140
|
|
|
* @var int |
141
|
|
|
*/ |
142
|
|
|
protected $day; |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Search Demand |
146
|
|
|
* |
147
|
|
|
* @var \DERHANSEN\SfEventMgt\Domain\Model\Dto\SearchDemand |
148
|
|
|
*/ |
149
|
|
|
protected $searchDemand = null; |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* Organisator |
153
|
|
|
* |
154
|
|
|
* @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
155
|
|
|
*/ |
156
|
|
|
protected $organisator = null; |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @var bool |
160
|
|
|
*/ |
161
|
|
|
protected $ignoreEnableFields = false; |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Sets the displayMode |
165
|
|
|
* |
166
|
|
|
* @param string $displayMode Displaymode |
167
|
|
|
* |
168
|
|
|
* @return void |
169
|
|
|
*/ |
170
|
|
|
public function setDisplayMode($displayMode) |
171
|
|
|
{ |
172
|
|
|
$this->displayMode = $displayMode; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* Returns the displayMode |
177
|
|
|
* |
178
|
|
|
* @return string |
179
|
|
|
*/ |
180
|
|
|
public function getDisplayMode() |
181
|
|
|
{ |
182
|
|
|
return $this->displayMode; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* Sets the storage page |
187
|
|
|
* |
188
|
|
|
* @param string $storagePage Storagepage |
189
|
|
|
* |
190
|
|
|
* @return void |
191
|
|
|
*/ |
192
|
|
|
public function setStoragePage($storagePage) |
193
|
|
|
{ |
194
|
|
|
$this->storagePage = $storagePage; |
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* Returns the storage page |
199
|
|
|
* |
200
|
|
|
* @return string |
201
|
|
|
*/ |
202
|
|
|
public function getStoragePage() |
203
|
|
|
{ |
204
|
|
|
return $this->storagePage; |
205
|
|
|
} |
206
|
|
|
|
207
|
|
|
/** |
208
|
|
|
* Sets the current DateTime |
209
|
|
|
* |
210
|
|
|
* @param \DateTime $currentDateTime CurrentDateTime |
211
|
|
|
* |
212
|
|
|
* @return void |
213
|
|
|
*/ |
214
|
|
|
public function setCurrentDateTime(\DateTime $currentDateTime) |
215
|
|
|
{ |
216
|
|
|
$this->currentDateTime = $currentDateTime; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* Returns the current datetime |
221
|
|
|
* |
222
|
|
|
* @return \DateTime |
223
|
|
|
*/ |
224
|
|
|
public function getCurrentDateTime() |
225
|
|
|
{ |
226
|
|
|
if ($this->currentDateTime != null) { |
227
|
|
|
return $this->currentDateTime; |
228
|
|
|
} |
229
|
|
|
|
230
|
|
|
return new \DateTime(); |
231
|
|
|
} |
232
|
|
|
|
233
|
|
|
/** |
234
|
|
|
* Sets the category (seperated by comma) |
235
|
|
|
* |
236
|
|
|
* @param string $category Category |
237
|
|
|
* |
238
|
|
|
* @return void |
239
|
|
|
*/ |
240
|
|
|
public function setCategory($category) |
241
|
|
|
{ |
242
|
|
|
$this->category = $category; |
243
|
|
|
} |
244
|
|
|
|
245
|
|
|
/** |
246
|
|
|
* Returns the category (seperated by comma) |
247
|
|
|
* |
248
|
|
|
* @return string |
249
|
|
|
*/ |
250
|
|
|
public function getCategory() |
251
|
|
|
{ |
252
|
|
|
return $this->category; |
253
|
|
|
} |
254
|
|
|
|
255
|
|
|
/** |
256
|
|
|
* Returns includeSubcategories |
257
|
|
|
* |
258
|
|
|
* @return bool |
259
|
|
|
*/ |
260
|
|
|
public function getIncludeSubcategories() |
261
|
|
|
{ |
262
|
|
|
return $this->includeSubcategories; |
263
|
|
|
} |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* Sets includeSubcategories |
267
|
|
|
* |
268
|
|
|
* @param bool $includeSubcategories |
269
|
|
|
* @return void |
270
|
|
|
*/ |
271
|
|
|
public function setIncludeSubcategories($includeSubcategories) |
272
|
|
|
{ |
273
|
|
|
$this->includeSubcategories = $includeSubcategories; |
274
|
|
|
} |
275
|
|
|
|
276
|
|
|
/** |
277
|
|
|
* Returns topEventRestriction |
278
|
|
|
* |
279
|
|
|
* @return int |
280
|
|
|
*/ |
281
|
|
|
public function getTopEventRestriction() |
282
|
|
|
{ |
283
|
|
|
return $this->topEventRestriction; |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* Sets topEventRestriction |
288
|
|
|
* |
289
|
|
|
* @param int $topEventRestriction TopEventRestriction |
290
|
|
|
* |
291
|
|
|
* @return void |
292
|
|
|
*/ |
293
|
|
|
public function setTopEventRestriction($topEventRestriction) |
294
|
|
|
{ |
295
|
|
|
$this->topEventRestriction = $topEventRestriction; |
296
|
|
|
} |
297
|
|
|
|
298
|
|
|
/** |
299
|
|
|
* Returns the order direction |
300
|
|
|
* |
301
|
|
|
* @return string |
302
|
|
|
*/ |
303
|
|
|
public function getOrderDirection() |
304
|
|
|
{ |
305
|
|
|
return $this->orderDirection; |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* Sets the order direction |
310
|
|
|
* |
311
|
|
|
* @param string $orderDirection OrderDirection |
312
|
|
|
* |
313
|
|
|
* @return void |
314
|
|
|
*/ |
315
|
|
|
public function setOrderDirection($orderDirection) |
316
|
|
|
{ |
317
|
|
|
$this->orderDirection = $orderDirection; |
318
|
|
|
} |
319
|
|
|
|
320
|
|
|
/** |
321
|
|
|
* Returns the order field |
322
|
|
|
* |
323
|
|
|
* @return string |
324
|
|
|
*/ |
325
|
|
|
public function getOrderField() |
326
|
|
|
{ |
327
|
|
|
return $this->orderField; |
328
|
|
|
} |
329
|
|
|
|
330
|
|
|
/** |
331
|
|
|
* Sets the order field |
332
|
|
|
* |
333
|
|
|
* @param string $orderField OrderField |
334
|
|
|
* |
335
|
|
|
* @return void |
336
|
|
|
*/ |
337
|
|
|
public function setOrderField($orderField) |
338
|
|
|
{ |
339
|
|
|
$this->orderField = $orderField; |
340
|
|
|
} |
341
|
|
|
|
342
|
|
|
/** |
343
|
|
|
* Returns orderFieldAllowed |
344
|
|
|
* |
345
|
|
|
* @return string |
346
|
|
|
*/ |
347
|
|
|
public function getOrderFieldAllowed() |
348
|
|
|
{ |
349
|
|
|
return $this->orderFieldAllowed; |
350
|
|
|
} |
351
|
|
|
|
352
|
|
|
/** |
353
|
|
|
* Sets orderFieldAllowed |
354
|
|
|
* |
355
|
|
|
* @param string $orderFieldAllowed |
356
|
|
|
* @return void |
357
|
|
|
*/ |
358
|
|
|
public function setOrderFieldAllowed($orderFieldAllowed) |
359
|
|
|
{ |
360
|
|
|
$this->orderFieldAllowed = $orderFieldAllowed; |
361
|
|
|
} |
362
|
|
|
|
363
|
|
|
/** |
364
|
|
|
* Returns the query limit |
365
|
|
|
* |
366
|
|
|
* @return int |
367
|
|
|
*/ |
368
|
|
|
public function getQueryLimit() |
369
|
|
|
{ |
370
|
|
|
return $this->queryLimit; |
371
|
|
|
} |
372
|
|
|
|
373
|
|
|
/** |
374
|
|
|
* Sets the query limit |
375
|
|
|
* |
376
|
|
|
* @param int $queryLimit QueryLimit |
377
|
|
|
* |
378
|
|
|
* @return void |
379
|
|
|
*/ |
380
|
|
|
public function setQueryLimit($queryLimit) |
381
|
|
|
{ |
382
|
|
|
$this->queryLimit = $queryLimit; |
383
|
|
|
} |
384
|
|
|
|
385
|
|
|
/** |
386
|
|
|
* Returns the location |
387
|
|
|
* |
388
|
|
|
* @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
389
|
|
|
*/ |
390
|
|
|
public function getLocation() |
391
|
|
|
{ |
392
|
|
|
return $this->location; |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
/** |
396
|
|
|
* Sets the location |
397
|
|
|
* |
398
|
|
|
* @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
399
|
|
|
* |
400
|
|
|
* @return void |
401
|
|
|
*/ |
402
|
|
|
public function setLocation($location) |
403
|
|
|
{ |
404
|
|
|
$this->location = $location; |
405
|
|
|
} |
406
|
|
|
|
407
|
|
|
/** |
408
|
|
|
* Returns locationCity |
409
|
|
|
* |
410
|
|
|
* @return string |
411
|
|
|
*/ |
412
|
|
|
public function getLocationCity() |
413
|
|
|
{ |
414
|
|
|
return $this->locationCity; |
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* Sets locationCity |
419
|
|
|
* |
420
|
|
|
* @param string $locationCity LocationCity |
421
|
|
|
* |
422
|
|
|
* @return void |
423
|
|
|
*/ |
424
|
|
|
public function setLocationCity($locationCity) |
425
|
|
|
{ |
426
|
|
|
$this->locationCity = $locationCity; |
427
|
|
|
} |
428
|
|
|
|
429
|
|
|
/** |
430
|
|
|
* Returns locationCountry |
431
|
|
|
* |
432
|
|
|
* @return string |
433
|
|
|
*/ |
434
|
|
|
public function getLocationCountry() |
435
|
|
|
{ |
436
|
|
|
return $this->locationCountry; |
437
|
|
|
} |
438
|
|
|
|
439
|
|
|
/** |
440
|
|
|
* Sets locationCountry |
441
|
|
|
* |
442
|
|
|
* @param string $locationCountry LocationCountry |
443
|
|
|
* |
444
|
|
|
* @return void |
445
|
|
|
*/ |
446
|
|
|
public function setLocationCountry($locationCountry) |
447
|
|
|
{ |
448
|
|
|
$this->locationCountry = $locationCountry; |
449
|
|
|
} |
450
|
|
|
|
451
|
|
|
/** |
452
|
|
|
* Returns year |
453
|
|
|
* |
454
|
|
|
* @return int |
455
|
|
|
*/ |
456
|
|
|
public function getYear() |
457
|
|
|
{ |
458
|
|
|
return $this->year; |
459
|
|
|
} |
460
|
|
|
|
461
|
|
|
/** |
462
|
|
|
* Sets year |
463
|
|
|
* |
464
|
|
|
* @param int $year |
465
|
|
|
* @return void |
466
|
|
|
*/ |
467
|
|
|
public function setYear($year) |
468
|
|
|
{ |
469
|
|
|
$this->year = $year; |
470
|
|
|
} |
471
|
|
|
|
472
|
|
|
/** |
473
|
|
|
* Returns month |
474
|
|
|
* |
475
|
|
|
* @return int |
476
|
|
|
*/ |
477
|
|
|
public function getMonth() |
478
|
|
|
{ |
479
|
|
|
return $this->month; |
480
|
|
|
} |
481
|
|
|
|
482
|
|
|
/** |
483
|
|
|
* Sets month |
484
|
|
|
* |
485
|
|
|
* @param int $month |
486
|
|
|
* @return void |
487
|
|
|
*/ |
488
|
|
|
public function setMonth($month) |
489
|
|
|
{ |
490
|
|
|
$this->month = $month; |
491
|
|
|
} |
492
|
|
|
|
493
|
|
|
/** |
494
|
|
|
* Returns day |
495
|
|
|
* |
496
|
|
|
* @return int |
497
|
|
|
*/ |
498
|
|
|
public function getDay() |
499
|
|
|
{ |
500
|
|
|
return $this->day; |
501
|
|
|
} |
502
|
|
|
|
503
|
|
|
/** |
504
|
|
|
* @param int $day |
505
|
|
|
* @return void |
506
|
|
|
*/ |
507
|
|
|
public function setDay($day) |
508
|
|
|
{ |
509
|
|
|
$this->day = $day; |
510
|
|
|
} |
511
|
|
|
|
512
|
|
|
/** |
513
|
|
|
* Returns the searchDemand |
514
|
|
|
* |
515
|
|
|
* @return SearchDemand |
516
|
|
|
*/ |
517
|
|
|
public function getSearchDemand() |
518
|
|
|
{ |
519
|
|
|
return $this->searchDemand; |
520
|
|
|
} |
521
|
|
|
|
522
|
|
|
/** |
523
|
|
|
* Sets the searchDemand |
524
|
|
|
* |
525
|
|
|
* @param SearchDemand $searchDemand |
526
|
|
|
* @return void |
527
|
|
|
*/ |
528
|
|
|
public function setSearchDemand($searchDemand) |
529
|
|
|
{ |
530
|
|
|
$this->searchDemand = $searchDemand; |
531
|
|
|
} |
532
|
|
|
|
533
|
|
|
/** |
534
|
|
|
* Returns organisator |
535
|
|
|
* |
536
|
|
|
* @return \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
537
|
|
|
*/ |
538
|
|
|
public function getOrganisator() |
539
|
|
|
{ |
540
|
|
|
return $this->organisator; |
541
|
|
|
} |
542
|
|
|
|
543
|
|
|
/** |
544
|
|
|
* Sets organisator |
545
|
|
|
* |
546
|
|
|
* @param \DERHANSEN\SfEventMgt\Domain\Model\Organisator $organisator |
547
|
|
|
* @return void |
548
|
|
|
*/ |
549
|
|
|
public function setOrganisator($organisator) |
550
|
|
|
{ |
551
|
|
|
$this->organisator = $organisator; |
552
|
|
|
} |
553
|
|
|
|
554
|
|
|
/** |
555
|
|
|
* Returns categoryConjuction |
556
|
|
|
* |
557
|
|
|
* @return string |
558
|
|
|
*/ |
559
|
|
|
public function getCategoryConjunction() |
560
|
|
|
{ |
561
|
|
|
return $this->categoryConjunction; |
562
|
|
|
} |
563
|
|
|
|
564
|
|
|
/** |
565
|
|
|
* Sets categoryConjuction |
566
|
|
|
* |
567
|
|
|
* @param string $categoryConjunction |
568
|
|
|
* @return void |
569
|
|
|
*/ |
570
|
|
|
public function setCategoryConjunction($categoryConjunction) |
571
|
|
|
{ |
572
|
|
|
$this->categoryConjunction = $categoryConjunction; |
573
|
|
|
} |
574
|
|
|
|
575
|
|
|
/** |
576
|
|
|
* Returns speaker |
577
|
|
|
* |
578
|
|
|
* @return \DERHANSEN\SfEventMgt\Domain\Model\Speaker |
579
|
|
|
*/ |
580
|
|
|
public function getSpeaker() |
581
|
|
|
{ |
582
|
|
|
return $this->speaker; |
583
|
|
|
} |
584
|
|
|
|
585
|
|
|
/** |
586
|
|
|
* Sets speaker |
587
|
|
|
* |
588
|
|
|
* @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
589
|
|
|
* @return void |
590
|
|
|
*/ |
591
|
|
|
public function setSpeaker($speaker) |
592
|
|
|
{ |
593
|
|
|
$this->speaker = $speaker; |
594
|
|
|
} |
595
|
|
|
|
596
|
|
|
/** |
597
|
|
|
* @return bool |
598
|
|
|
*/ |
599
|
|
|
public function getIgnoreEnableFields(): bool |
600
|
|
|
{ |
601
|
|
|
return $this->ignoreEnableFields; |
602
|
|
|
} |
603
|
|
|
|
604
|
|
|
/** |
605
|
|
|
* @param bool $ignoreEnableFields |
606
|
|
|
*/ |
607
|
|
|
public function setIgnoreEnableFields(bool $ignoreEnableFields): void |
608
|
|
|
{ |
609
|
|
|
$this->ignoreEnableFields = $ignoreEnableFields; |
610
|
|
|
} |
611
|
|
|
} |
612
|
|
|
|