Completed
Push — master ( c9d31b...4404d6 )
by Torben
07:34
created

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