Completed
Push — master ( 97e4cd...3eb551 )
by Tim
03:06
created

Configuration::setState()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Configuration for time options
4
 *
5
 * @author  Tim Lochmüller
6
 */
7
namespace HDNET\Calendarize\Domain\Model;
8
9
/**
10
 * Configuration for time options
11
 *
12
 * @db
13
 * @smartExclude Language
14
 */
15
class Configuration extends AbstractModel implements ConfigurationInterface
16
{
17
18
    /**
19
     * Type
20
     *
21
     * @var string
22
     * @db
23
     */
24
    protected $type = self::TYPE_TIME;
25
26
    /**
27
     * Handling
28
     *
29
     * @var string
30
     * @db
31
     */
32
    protected $handling = self::HANDLING_INCLUDE;
33
34
    /**
35
     * State
36
     *
37
     * @var string
38
     * @db
39
     */
40
    protected $state = self::STATE_DEFAULT;
41
42
    /**
43
     * Start date
44
     *
45
     * @var \DateTime
46
     * @db
47
     */
48
    protected $startDate;
49
50
    /**
51
     * End date
52
     *
53
     * @var \DateTime
54
     * @db
55
     */
56
    protected $endDate;
57
58
    /**
59
     * Start time
60
     *
61
     * @var int
62
     * @db
63
     */
64
    protected $startTime;
65
66
    /**
67
     * End time
68
     *
69
     * @var int
70
     * @db
71
     */
72
    protected $endTime;
73
74
    /**
75
     * AllDay
76
     *
77
     * @var bool
78
     * @db
79
     */
80
    protected $allDay;
81
82
    /**
83
     * External ICS url
84
     *
85
     * @var string
86
     * @db
87
     */
88
    protected $externalIcsUrl;
89
90
    /**
91
     * Groups
92
     *
93
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\HDNET\Calendarize\Domain\Model\ConfigurationGroup>
94
     * @db text
95
     * @lazy
96
     */
97
    protected $groups;
98
99
    /**
100
     * Frequency
101
     *
102
     * @var string
103
     * @db
104
     */
105
    protected $frequency = self::FREQUENCY_NONE;
106
107
    /**
108
     * Till date
109
     *
110
     * @var \DateTime
111
     * @db
112
     */
113
    protected $tillDate;
114
115
    /**
116
     * Counter amount
117
     *
118
     * @var  int
119
     * @db
120
     */
121
    protected $counterAmount;
122
123
    /**
124
     * Counter interval
125
     *
126
     * @var int
127
     * @db
128
     */
129
    protected $counterInterval;
130
131
    /**
132
     * Recurrence
133
     *
134
     * @var string
135
     * @db
136
     */
137
    protected $recurrence = self::RECURRENCE_NONE;
138
139
    /**
140
     * Day property
141
     *
142
     * @var string
143
     * @db
144
     */
145
    protected $day = self::DAY_NONE;
146
147
    /**
148
     * Import ID if the item is based on an ICS structure
149
     *
150
     * @var string
151
     * @db
152
     */
153
    protected $importId;
154
155
    /**
156
     * Configuration constructor.
157
     */
158
    public function __construct()
159
    {
160
        $this->groups = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
161
    }
162
163
    /**
164
     * Get type
165
     *
166
     * @return string
167
     */
168
    public function getType()
169
    {
170
        return $this->type;
171
    }
172
173
    /**
174
     * Set type
175
     *
176
     * @param string $type
177
     *
178
     * @return void
179
     */
180
    public function setType($type)
181
    {
182
        $this->type = $type;
183
    }
184
185
    /**
186
     * Is all day
187
     *
188
     * @return bool
189
     */
190
    public function isAllDay()
191
    {
192
        return (bool)$this->allDay;
193
    }
194
195
    /**
196
     * Set all day
197
     *
198
     * @param bool $allDay
199
     */
200
    public function setAllDay($allDay)
201
    {
202
        $this->allDay = (bool)$allDay;
203
    }
204
205
    /**
206
     * Get end date
207
     *
208
     * @return \DateTime
209
     */
210
    public function getEndDate()
211
    {
212
        return $this->endDate;
213
    }
214
215
    /**
216
     * Set end date
217
     *
218
     * @param \DateTime $endDate
219
     */
220
    public function setEndDate($endDate)
221
    {
222
        $this->endDate = $endDate;
223
    }
224
225
    /**
226
     * Get end time
227
     *
228
     * @return int
229
     */
230
    public function getEndTime()
231
    {
232
        return $this->endTime;
233
    }
234
235
    /**
236
     * Set end time
237
     *
238
     * @param int $endTime
239
     */
240
    public function setEndTime($endTime)
241
    {
242
        $this->endTime = $endTime;
243
    }
244
245
    /**
246
     * Get start date
247
     *
248
     * @return \DateTime
249
     */
250
    public function getStartDate()
251
    {
252
        return $this->startDate;
253
    }
254
255
    /**
256
     * Set start date
257
     *
258
     * @param \DateTime $startDate
259
     */
260
    public function setStartDate($startDate)
261
    {
262
        $this->startDate = $startDate;
263
    }
264
265
    /**
266
     * Get start time
267
     *
268
     * @return int
269
     */
270
    public function getStartTime()
271
    {
272
        return $this->startTime;
273
    }
274
275
    /**
276
     * Set start time
277
     *
278
     * @param int $startTime
279
     */
280
    public function setStartTime($startTime)
281
    {
282
        $this->startTime = $startTime;
283
    }
284
285
    /**
286
     * Get groups
287
     *
288
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
289
     */
290
    public function getGroups()
291
    {
292
        return $this->groups;
293
    }
294
295
    /**
296
     * Set groups
297
     *
298
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groups
299
     */
300
    public function setGroups($groups)
301
    {
302
        $this->groups = $groups;
303
    }
304
305
    /**
306
     * Get frequency
307
     *
308
     * @return string
309
     */
310
    public function getFrequency()
311
    {
312
        return $this->frequency;
313
    }
314
315
    /**
316
     * Set frequency
317
     *
318
     * @param string $frequency
319
     */
320
    public function setFrequency($frequency)
321
    {
322
        $this->frequency = $frequency;
323
    }
324
325
    /**
326
     * Get till date
327
     *
328
     * @return \DateTime
329
     */
330
    public function getTillDate()
331
    {
332
        return $this->tillDate;
333
    }
334
335
    /**
336
     * Set till date
337
     *
338
     * @param \DateTime $tillDate
339
     */
340
    public function setTillDate($tillDate)
341
    {
342
        $this->tillDate = $tillDate;
343
    }
344
345
    /**
346
     * Get counter amount
347
     *
348
     * @return int
349
     */
350
    public function getCounterAmount()
351
    {
352
        return $this->counterAmount;
353
    }
354
355
    /**
356
     * Set counter amount
357
     *
358
     * @param int $counterAmount
359
     */
360
    public function setCounterAmount($counterAmount)
361
    {
362
        $this->counterAmount = $counterAmount;
363
    }
364
365
    /**
366
     * Get counter interval
367
     *
368
     * @return int
369
     */
370
    public function getCounterInterval()
371
    {
372
        return $this->counterInterval;
373
    }
374
375
    /**
376
     * Set counter interval
377
     *
378
     * @param int $counterInterval
379
     */
380
    public function setCounterInterval($counterInterval)
381
    {
382
        $this->counterInterval = $counterInterval;
383
    }
384
385
    /**
386
     * Get external ICS URL
387
     *
388
     * @return string
389
     */
390
    public function getExternalIcsUrl()
391
    {
392
        return $this->externalIcsUrl;
393
    }
394
395
    /**
396
     * Set external ICS URL
397
     *
398
     * @param string $externalIcsUrl
399
     */
400
    public function setExternalIcsUrl($externalIcsUrl)
401
    {
402
        $this->externalIcsUrl = $externalIcsUrl;
403
    }
404
405
    /**
406
     * Get day
407
     *
408
     * @return string
409
     */
410
    public function getDay()
411
    {
412
        return $this->day;
413
    }
414
415
    /**
416
     * Set day
417
     *
418
     * @param string $day
419
     */
420
    public function setDay($day)
421
    {
422
        $this->day = $day;
423
    }
424
425
    /**
426
     * Get recurrence
427
     *
428
     * @return string
429
     */
430
    public function getRecurrence()
431
    {
432
        return $this->recurrence;
433
    }
434
435
    /**
436
     * Set recurrence
437
     *
438
     * @param string $recurrence
439
     */
440
    public function setRecurrence($recurrence)
441
    {
442
        $this->recurrence = $recurrence;
443
    }
444
445
    /**
446
     * Get handling
447
     *
448
     * @return string
449
     */
450
    public function getHandling()
451
    {
452
        return $this->handling;
453
    }
454
455
    /**
456
     * Set handling
457
     *
458
     * @param string $handling
459
     */
460
    public function setHandling($handling)
461
    {
462
        $this->handling = $handling;
463
    }
464
465
    /**
466
     * Get state
467
     *
468
     * @return string
469
     */
470
    public function getState()
471
    {
472
        return trim($this->state);
473
    }
474
475
    /**
476
     * Set state
477
     *
478
     * @param string $state
479
     */
480
    public function setState($state)
481
    {
482
        $this->state = $state;
483
    }
484
485
}
486