Completed
Push — master ( 07b37d...b10e41 )
by Torben
02:00
created

EventDemand::getSearchDemand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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