Completed
Push — development ( b2c13c...294738 )
by Torben
09:28
created

EventDemand::setYear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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