Passed
Push — master ( da5c3a...138f6a )
by Torben
132:09 queued 128:49
created

EventDemand::setTimeRestrictionLow()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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