Completed
Push — master ( 1a67e9...ec29fe )
by Torben
42:38 queued 40:09
created

EventDemand::setCurrentDateTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
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
     * 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
     * Order direction
76
     *
77
     * @var string
78
     */
79
    protected $orderDirection = '';
80
81
    /**
82
     * Query limit
83
     *
84
     * @var int
85
     */
86
    protected $queryLimit = null;
87
88
    /**
89
     * Location
90
     *
91
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Location
92
     */
93
    protected $location = null;
94
95
    /**
96
     * City for location
97
     *
98
     * @var string
99
     */
100
    protected $locationCity = '';
101
102
    /**
103
     * Country for location
104
     *
105
     * @var string
106
     */
107
    protected $locationCountry = '';
108
109
    /**
110
     * Search Demand
111
     *
112
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Dto\SearchDemand
113
     */
114
    protected $searchDemand = null;
115
116
    /**
117
     * Sets the displayMode
118
     *
119
     * @param string $displayMode Displaymode
120
     *
121
     * @return void
122
     */
123 12
    public function setDisplayMode($displayMode)
124
    {
125 12
        $this->displayMode = $displayMode;
126 12
    }
127
128
    /**
129
     * Returns the displayMode
130
     *
131
     * @return string
132
     */
133 31
    public function getDisplayMode()
134
    {
135 31
        return $this->displayMode;
136
    }
137
138
    /**
139
     * Sets the storage page
140
     *
141
     * @param string $storagePage Storagepage
142
     *
143
     * @return void
144
     */
145 32
    public function setStoragePage($storagePage)
146
    {
147 32
        $this->storagePage = $storagePage;
148 32
    }
149
150
    /**
151
     * Returns the storage page
152
     *
153
     * @return string
154
     */
155 32
    public function getStoragePage()
156
    {
157 32
        return $this->storagePage;
158
    }
159
160
    /**
161
     * Sets the current DateTime
162
     *
163
     * @param \DateTime $currentDateTime CurrentDateTime
164
     *
165
     * @return void
166
     */
167 3
    public function setCurrentDateTime(\DateTime $currentDateTime)
168
    {
169 3
        $this->currentDateTime = $currentDateTime;
170 3
    }
171
172
    /**
173
     * Returns the current datetime
174
     *
175
     * @return \DateTime
176
     */
177 4
    public function getCurrentDateTime()
178
    {
179 4
        if ($this->currentDateTime != null) {
180 3
            return $this->currentDateTime;
181
        }
182 1
        return new \DateTime;
183
    }
184
185
    /**
186
     * Sets the category (seperated by comma)
187
     *
188
     * @param string $category Category
189
     *
190
     * @return void
191
     */
192 8
    public function setCategory($category)
193
    {
194 8
        $this->category = $category;
195 8
    }
196
197
    /**
198
     * Returns the category (seperated by comma)
199
     *
200
     * @return string
201
     */
202 32
    public function getCategory()
203
    {
204 32
        return $this->category;
205
    }
206
207
    /**
208
     * Returns includeSubcategories
209
     *
210
     * @return boolean
211
     */
212 6
    public function getIncludeSubcategories()
213
    {
214 6
        return $this->includeSubcategories;
215
    }
216
217
    /**
218
     * Sets includeSubcategories
219
     *
220
     * @param boolean $includeSubcategories
221
     * @return void
222
     */
223 5
    public function setIncludeSubcategories($includeSubcategories)
224
    {
225 5
        $this->includeSubcategories = $includeSubcategories;
226 5
    }
227
228
    /**
229
     * Returns topEventRestriction
230
     *
231
     * @return int
232
     */
233 32
    public function getTopEventRestriction()
234
    {
235 32
        return $this->topEventRestriction;
236
    }
237
238
    /**
239
     * Sets topEventRestriction
240
     *
241
     * @param int $topEventRestriction TopEventRestriction
242
     *
243
     * @return void
244
     */
245 4
    public function setTopEventRestriction($topEventRestriction)
246
    {
247 4
        $this->topEventRestriction = $topEventRestriction;
248 4
    }
249
250
    /**
251
     * Returns the order direction
252
     *
253
     * @return string
254
     */
255 8
    public function getOrderDirection()
256
    {
257 8
        return $this->orderDirection;
258
    }
259
260
    /**
261
     * Sets the order direction
262
     *
263
     * @param string $orderDirection OrderDirection
264
     *
265
     * @return void
266
     */
267 8
    public function setOrderDirection($orderDirection)
268
    {
269 8
        $this->orderDirection = $orderDirection;
270 8
    }
271
272
    /**
273
     * Returns the order field
274
     *
275
     * @return string
276
     */
277 32
    public function getOrderField()
278
    {
279 32
        return $this->orderField;
280
    }
281
282
    /**
283
     * Sets the order field
284
     *
285
     * @param string $orderField OrderField
286
     *
287
     * @return void
288
     */
289 8
    public function setOrderField($orderField)
290
    {
291 8
        $this->orderField = $orderField;
292 8
    }
293
294
    /**
295
     * Returns the query limit
296
     *
297
     * @return int
298
     */
299 32
    public function getQueryLimit()
300
    {
301 32
        return $this->queryLimit;
302
    }
303
304
    /**
305
     * Sets the query limit
306
     *
307
     * @param int $queryLimit QueryLimit
308
     *
309
     * @return void
310
     */
311 2
    public function setQueryLimit($queryLimit)
312
    {
313 2
        $this->queryLimit = $queryLimit;
314 2
    }
315
316
    /**
317
     * Returns the location
318
     *
319
     * @return \DERHANSEN\SfEventMgt\Domain\Model\Location
320
     */
321 32
    public function getLocation()
322
    {
323 32
        return $this->location;
324
    }
325
326
    /**
327
     * Sets the location
328
     *
329
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location
330
     *
331
     * @return void
332
     */
333 4
    public function setLocation($location)
334
    {
335 4
        $this->location = $location;
336 4
    }
337
338
    /**
339
     * Returns locationCity
340
     *
341
     * @return string
342
     */
343 32
    public function getLocationCity()
344
    {
345 32
        return $this->locationCity;
346
    }
347
348
    /**
349
     * Sets locationCity
350
     *
351
     * @param string $locationCity LocationCity
352
     *
353
     * @return void
354
     */
355 3
    public function setLocationCity($locationCity)
356
    {
357 3
        $this->locationCity = $locationCity;
358 3
    }
359
360
    /**
361
     * Returns locationCountry
362
     *
363
     * @return string
364
     */
365 32
    public function getLocationCountry()
366
    {
367 32
        return $this->locationCountry;
368
    }
369
370
    /**
371
     * Sets locationCountry
372
     *
373
     * @param string $locationCountry LocationCountry
374
     *
375
     * @return void
376
     */
377 3
    public function setLocationCountry($locationCountry)
378
    {
379 3
        $this->locationCountry = $locationCountry;
380 3
    }
381
382
    /**
383
     * Returns the searchDemand
384
     *
385
     * @return SearchDemand
386
     */
387 30
    public function getSearchDemand()
388
    {
389 30
        return $this->searchDemand;
390
    }
391
392
    /**
393
     * Sets the searchDemand
394
     *
395
     * @param SearchDemand $searchDemand
396
     * @return void
397
     */
398 4
    public function setSearchDemand($searchDemand)
399
    {
400 4
        $this->searchDemand = $searchDemand;
401 4
    }
402
403
}