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
|
|
|
* City for location |
104
|
|
|
* |
105
|
|
|
* @var string |
106
|
|
|
*/ |
107
|
|
|
protected $locationCity = ''; |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* Country for location |
111
|
|
|
* |
112
|
|
|
* @var string |
113
|
|
|
*/ |
114
|
|
|
protected $locationCountry = ''; |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* Year |
118
|
|
|
* |
119
|
|
|
* @var int |
120
|
|
|
*/ |
121
|
|
|
protected $year; |
122
|
|
|
|
123
|
12 |
|
/** |
124
|
|
|
* Month |
125
|
12 |
|
* |
126
|
12 |
|
* @var int |
127
|
|
|
*/ |
128
|
|
|
protected $month; |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Day |
132
|
|
|
* |
133
|
31 |
|
* @var int |
134
|
|
|
*/ |
135
|
31 |
|
protected $day; |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* Search Demand |
139
|
|
|
* |
140
|
|
|
* @var \DERHANSEN\SfEventMgt\Domain\Model\Dto\SearchDemand |
141
|
|
|
*/ |
142
|
|
|
protected $searchDemand = null; |
143
|
|
|
|
144
|
|
|
/** |
145
|
32 |
|
* Organisator |
146
|
|
|
* |
147
|
32 |
|
* @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
148
|
32 |
|
*/ |
149
|
|
|
protected $organisator = null; |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* Sets the displayMode |
153
|
|
|
* |
154
|
|
|
* @param string $displayMode Displaymode |
155
|
32 |
|
* |
156
|
|
|
* @return void |
157
|
32 |
|
*/ |
158
|
|
|
public function setDisplayMode($displayMode) |
159
|
|
|
{ |
160
|
|
|
$this->displayMode = $displayMode; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Returns the displayMode |
165
|
|
|
* |
166
|
|
|
* @return string |
167
|
3 |
|
*/ |
168
|
|
|
public function getDisplayMode() |
169
|
3 |
|
{ |
170
|
3 |
|
return $this->displayMode; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* Sets the storage page |
175
|
|
|
* |
176
|
|
|
* @param string $storagePage Storagepage |
177
|
4 |
|
* |
178
|
|
|
* @return void |
179
|
4 |
|
*/ |
180
|
3 |
|
public function setStoragePage($storagePage) |
181
|
|
|
{ |
182
|
1 |
|
$this->storagePage = $storagePage; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* Returns the storage page |
187
|
|
|
* |
188
|
|
|
* @return string |
189
|
|
|
*/ |
190
|
|
|
public function getStoragePage() |
191
|
|
|
{ |
192
|
8 |
|
return $this->storagePage; |
193
|
|
|
} |
194
|
8 |
|
|
195
|
8 |
|
/** |
196
|
|
|
* Sets the current DateTime |
197
|
|
|
* |
198
|
|
|
* @param \DateTime $currentDateTime CurrentDateTime |
199
|
|
|
* |
200
|
|
|
* @return void |
201
|
|
|
*/ |
202
|
32 |
|
public function setCurrentDateTime(\DateTime $currentDateTime) |
203
|
|
|
{ |
204
|
32 |
|
$this->currentDateTime = $currentDateTime; |
205
|
|
|
} |
206
|
|
|
|
207
|
|
|
/** |
208
|
|
|
* Returns the current datetime |
209
|
|
|
* |
210
|
|
|
* @return \DateTime |
211
|
|
|
*/ |
212
|
6 |
|
public function getCurrentDateTime() |
213
|
|
|
{ |
214
|
6 |
|
if ($this->currentDateTime != null) { |
215
|
|
|
return $this->currentDateTime; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
return new \DateTime(); |
219
|
|
|
} |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* Sets the category (seperated by comma) |
223
|
5 |
|
* |
224
|
|
|
* @param string $category Category |
225
|
5 |
|
* |
226
|
5 |
|
* @return void |
227
|
|
|
*/ |
228
|
|
|
public function setCategory($category) |
229
|
|
|
{ |
230
|
|
|
$this->category = $category; |
231
|
|
|
} |
232
|
|
|
|
233
|
32 |
|
/** |
234
|
|
|
* Returns the category (seperated by comma) |
235
|
32 |
|
* |
236
|
|
|
* @return string |
237
|
|
|
*/ |
238
|
|
|
public function getCategory() |
239
|
|
|
{ |
240
|
|
|
return $this->category; |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* Returns includeSubcategories |
245
|
4 |
|
* |
246
|
|
|
* @return bool |
247
|
4 |
|
*/ |
248
|
4 |
|
public function getIncludeSubcategories() |
249
|
|
|
{ |
250
|
|
|
return $this->includeSubcategories; |
251
|
|
|
} |
252
|
|
|
|
253
|
|
|
/** |
254
|
|
|
* Sets includeSubcategories |
255
|
8 |
|
* |
256
|
|
|
* @param bool $includeSubcategories |
257
|
8 |
|
* @return void |
258
|
|
|
*/ |
259
|
|
|
public function setIncludeSubcategories($includeSubcategories) |
260
|
|
|
{ |
261
|
|
|
$this->includeSubcategories = $includeSubcategories; |
262
|
|
|
} |
263
|
|
|
|
264
|
|
|
/** |
265
|
|
|
* Returns topEventRestriction |
266
|
|
|
* |
267
|
8 |
|
* @return int |
268
|
|
|
*/ |
269
|
8 |
|
public function getTopEventRestriction() |
270
|
8 |
|
{ |
271
|
|
|
return $this->topEventRestriction; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* Sets topEventRestriction |
276
|
|
|
* |
277
|
32 |
|
* @param int $topEventRestriction TopEventRestriction |
278
|
|
|
* |
279
|
32 |
|
* @return void |
280
|
|
|
*/ |
281
|
|
|
public function setTopEventRestriction($topEventRestriction) |
282
|
|
|
{ |
283
|
|
|
$this->topEventRestriction = $topEventRestriction; |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* Returns the order direction |
288
|
|
|
* |
289
|
8 |
|
* @return string |
290
|
|
|
*/ |
291
|
8 |
|
public function getOrderDirection() |
292
|
8 |
|
{ |
293
|
|
|
return $this->orderDirection; |
294
|
|
|
} |
295
|
|
|
|
296
|
|
|
/** |
297
|
|
|
* Sets the order direction |
298
|
|
|
* |
299
|
32 |
|
* @param string $orderDirection OrderDirection |
300
|
|
|
* |
301
|
32 |
|
* @return void |
302
|
|
|
*/ |
303
|
|
|
public function setOrderDirection($orderDirection) |
304
|
|
|
{ |
305
|
|
|
$this->orderDirection = $orderDirection; |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* Returns the order field |
310
|
|
|
* |
311
|
2 |
|
* @return string |
312
|
|
|
*/ |
313
|
2 |
|
public function getOrderField() |
314
|
2 |
|
{ |
315
|
|
|
return $this->orderField; |
316
|
|
|
} |
317
|
|
|
|
318
|
|
|
/** |
319
|
|
|
* Sets the order field |
320
|
|
|
* |
321
|
32 |
|
* @param string $orderField OrderField |
322
|
|
|
* |
323
|
32 |
|
* @return void |
324
|
|
|
*/ |
325
|
|
|
public function setOrderField($orderField) |
326
|
|
|
{ |
327
|
|
|
$this->orderField = $orderField; |
328
|
|
|
} |
329
|
|
|
|
330
|
|
|
/** |
331
|
|
|
* Returns orderFieldAllowed |
332
|
|
|
* |
333
|
4 |
|
* @return string |
334
|
|
|
*/ |
335
|
4 |
|
public function getOrderFieldAllowed() |
336
|
4 |
|
{ |
337
|
|
|
return $this->orderFieldAllowed; |
338
|
|
|
} |
339
|
|
|
|
340
|
|
|
/** |
341
|
|
|
* Sets orderFieldAllowed |
342
|
|
|
* |
343
|
32 |
|
* @param string $orderFieldAllowed |
344
|
|
|
* @return void |
345
|
32 |
|
*/ |
346
|
|
|
public function setOrderFieldAllowed($orderFieldAllowed) |
347
|
|
|
{ |
348
|
|
|
$this->orderFieldAllowed = $orderFieldAllowed; |
349
|
|
|
} |
350
|
|
|
|
351
|
|
|
/** |
352
|
|
|
* Returns the query limit |
353
|
|
|
* |
354
|
|
|
* @return int |
355
|
3 |
|
*/ |
356
|
|
|
public function getQueryLimit() |
357
|
3 |
|
{ |
358
|
3 |
|
return $this->queryLimit; |
359
|
|
|
} |
360
|
|
|
|
361
|
|
|
/** |
362
|
|
|
* Sets the query limit |
363
|
|
|
* |
364
|
|
|
* @param int $queryLimit QueryLimit |
365
|
32 |
|
* |
366
|
|
|
* @return void |
367
|
32 |
|
*/ |
368
|
|
|
public function setQueryLimit($queryLimit) |
369
|
|
|
{ |
370
|
|
|
$this->queryLimit = $queryLimit; |
371
|
|
|
} |
372
|
|
|
|
373
|
|
|
/** |
374
|
|
|
* Returns the location |
375
|
|
|
* |
376
|
|
|
* @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
377
|
3 |
|
*/ |
378
|
|
|
public function getLocation() |
379
|
3 |
|
{ |
380
|
3 |
|
return $this->location; |
381
|
|
|
} |
382
|
|
|
|
383
|
|
|
/** |
384
|
|
|
* Sets the location |
385
|
|
|
* |
386
|
|
|
* @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
387
|
30 |
|
* |
388
|
|
|
* @return void |
389
|
30 |
|
*/ |
390
|
|
|
public function setLocation($location) |
391
|
|
|
{ |
392
|
|
|
$this->location = $location; |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
/** |
396
|
|
|
* Returns locationCity |
397
|
|
|
* |
398
|
4 |
|
* @return string |
399
|
|
|
*/ |
400
|
4 |
|
public function getLocationCity() |
401
|
4 |
|
{ |
402
|
|
|
return $this->locationCity; |
403
|
|
|
} |
404
|
|
|
|
405
|
|
|
/** |
406
|
|
|
* Sets locationCity |
407
|
|
|
* |
408
|
|
|
* @param string $locationCity LocationCity |
409
|
|
|
* |
410
|
|
|
* @return void |
411
|
|
|
*/ |
412
|
|
|
public function setLocationCity($locationCity) |
413
|
|
|
{ |
414
|
|
|
$this->locationCity = $locationCity; |
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* Returns locationCountry |
419
|
|
|
* |
420
|
|
|
* @return string |
421
|
|
|
*/ |
422
|
|
|
public function getLocationCountry() |
423
|
|
|
{ |
424
|
|
|
return $this->locationCountry; |
425
|
|
|
} |
426
|
|
|
|
427
|
|
|
/** |
428
|
|
|
* Sets locationCountry |
429
|
|
|
* |
430
|
|
|
* @param string $locationCountry LocationCountry |
431
|
|
|
* |
432
|
|
|
* @return void |
433
|
|
|
*/ |
434
|
|
|
public function setLocationCountry($locationCountry) |
435
|
|
|
{ |
436
|
|
|
$this->locationCountry = $locationCountry; |
437
|
|
|
} |
438
|
|
|
|
439
|
|
|
/** |
440
|
|
|
* Returns year |
441
|
|
|
* |
442
|
|
|
* @return int |
443
|
|
|
*/ |
444
|
|
|
public function getYear() |
445
|
|
|
{ |
446
|
|
|
return $this->year; |
447
|
|
|
} |
448
|
|
|
|
449
|
|
|
/** |
450
|
|
|
* Sets year |
451
|
|
|
* |
452
|
|
|
* @param int $year |
453
|
|
|
* @return void |
454
|
|
|
*/ |
455
|
|
|
public function setYear($year) |
456
|
|
|
{ |
457
|
|
|
$this->year = $year; |
458
|
|
|
} |
459
|
|
|
|
460
|
|
|
/** |
461
|
|
|
* Returns month |
462
|
|
|
* |
463
|
|
|
* @return int |
464
|
|
|
*/ |
465
|
|
|
public function getMonth() |
466
|
|
|
{ |
467
|
|
|
return $this->month; |
468
|
|
|
} |
469
|
|
|
|
470
|
|
|
/** |
471
|
|
|
* Sets month |
472
|
|
|
* |
473
|
|
|
* @param int $month |
474
|
|
|
* @return void |
475
|
|
|
*/ |
476
|
|
|
public function setMonth($month) |
477
|
|
|
{ |
478
|
|
|
$this->month = $month; |
479
|
|
|
} |
480
|
|
|
|
481
|
|
|
/** |
482
|
|
|
* Returns day |
483
|
|
|
* |
484
|
|
|
* @return int |
485
|
|
|
*/ |
486
|
|
|
public function getDay() |
487
|
|
|
{ |
488
|
|
|
return $this->day; |
489
|
|
|
} |
490
|
|
|
|
491
|
|
|
/** |
492
|
|
|
* @param int $day |
493
|
|
|
* @return void |
494
|
|
|
*/ |
495
|
|
|
public function setDay($day) |
496
|
|
|
{ |
497
|
|
|
$this->day = $day; |
498
|
|
|
} |
499
|
|
|
|
500
|
|
|
/** |
501
|
|
|
* Returns the searchDemand |
502
|
|
|
* |
503
|
|
|
* @return SearchDemand |
504
|
|
|
*/ |
505
|
|
|
public function getSearchDemand() |
506
|
|
|
{ |
507
|
|
|
return $this->searchDemand; |
508
|
|
|
} |
509
|
|
|
|
510
|
|
|
/** |
511
|
|
|
* Sets the searchDemand |
512
|
|
|
* |
513
|
|
|
* @param SearchDemand $searchDemand |
514
|
|
|
* @return void |
515
|
|
|
*/ |
516
|
|
|
public function setSearchDemand($searchDemand) |
517
|
|
|
{ |
518
|
|
|
$this->searchDemand = $searchDemand; |
519
|
|
|
} |
520
|
|
|
|
521
|
|
|
/** |
522
|
|
|
* Returns organisator |
523
|
|
|
* |
524
|
|
|
* @return \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
525
|
|
|
*/ |
526
|
|
|
public function getOrganisator() |
527
|
|
|
{ |
528
|
|
|
return $this->organisator; |
529
|
|
|
} |
530
|
|
|
|
531
|
|
|
/** |
532
|
|
|
* Sets organisator |
533
|
|
|
* |
534
|
|
|
* @param \DERHANSEN\SfEventMgt\Domain\Model\Organisator $organisator |
535
|
|
|
* @return void |
536
|
|
|
*/ |
537
|
|
|
public function setOrganisator($organisator) |
538
|
|
|
{ |
539
|
|
|
$this->organisator = $organisator; |
540
|
|
|
} |
541
|
|
|
|
542
|
|
|
/** |
543
|
|
|
* Returns categoryConjuction |
544
|
|
|
* |
545
|
|
|
* @return string |
546
|
|
|
*/ |
547
|
|
|
public function getCategoryConjunction() |
548
|
|
|
{ |
549
|
|
|
return $this->categoryConjunction; |
550
|
|
|
} |
551
|
|
|
|
552
|
|
|
/** |
553
|
|
|
* Sets categoryConjuction |
554
|
|
|
* |
555
|
|
|
* @param string $categoryConjunction |
556
|
|
|
* @return void |
557
|
|
|
*/ |
558
|
|
|
public function setCategoryConjunction($categoryConjunction) |
559
|
|
|
{ |
560
|
|
|
$this->categoryConjunction = $categoryConjunction; |
561
|
|
|
} |
562
|
|
|
} |
563
|
|
|
|