Completed
Push — master ( c9546d...95f607 )
by Julito
09:41
created

PersonalAgenda::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Chamilo\CoreBundle\Traits\UserTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * PersonalAgenda.
12
 *
13
 * @ORM\Table(name="personal_agenda", indexes={@ORM\Index(name="idx_personal_agenda_user", columns={"user"}),
14
 * @ORM\Index(name="idx_personal_agenda_parent", columns={"parent_event_id"})})
15
 * @ORM\Entity
16
 */
17
class PersonalAgenda
18
{
19
    use UserTrait;
20
21
    /**
22
     * @var int
23
     *
24
     * @ORM\Column(name="id", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue
27
     */
28
    protected $id;
29
30
    /**
31
     * @var User
32
     *
33
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="personalAgendas")
34
     * @ORM\JoinColumn(name="user", referencedColumnName="id", onDelete="CASCADE")
35
     */
36
    protected $user;
37
38
    /**
39
     * @var string
40
     *
41
     * @ORM\Column(name="title", type="text", nullable=true)
42
     */
43
    protected $title;
44
45
    /**
46
     * @var string
47
     *
48
     * @ORM\Column(name="text", type="text", nullable=true)
49
     */
50
    protected $text;
51
52
    /**
53
     * @var \DateTime
54
     *
55
     * @ORM\Column(name="date", type="datetime", nullable=true)
56
     */
57
    protected $date;
58
59
    /**
60
     * @var \DateTime
61
     *
62
     * @ORM\Column(name="enddate", type="datetime", nullable=true)
63
     */
64
    protected $endDate;
65
66
    /**
67
     * @var int
68
     *
69
     * @ORM\Column(name="parent_event_id", type="integer", nullable=true)
70
     */
71
    protected $parentEventId;
72
73
    /**
74
     * @var int
75
     *
76
     * @ORM\Column(name="all_day", type="integer", nullable=false)
77
     */
78
    protected $allDay;
79
80
    /**
81
     * @var string
82
     *
83
     * @ORM\Column(name="color", type="string", length=255, nullable=true)
84
     */
85
    protected $color;
86
87
    /**
88
     * Set title.
89
     *
90
     * @param string $title
91
     *
92
     * @return PersonalAgenda
93
     */
94
    public function setTitle($title)
95
    {
96
        $this->title = $title;
97
98
        return $this;
99
    }
100
101
    /**
102
     * Get title.
103
     *
104
     * @return string
105
     */
106
    public function getTitle()
107
    {
108
        return $this->title;
109
    }
110
111
    /**
112
     * Set text.
113
     *
114
     * @param string $text
115
     *
116
     * @return PersonalAgenda
117
     */
118
    public function setText($text)
119
    {
120
        $this->text = $text;
121
122
        return $this;
123
    }
124
125
    /**
126
     * Get text.
127
     *
128
     * @return string
129
     */
130
    public function getText()
131
    {
132
        return $this->text;
133
    }
134
135
    /**
136
     * Set date.
137
     *
138
     * @param \DateTime $date
139
     *
140
     * @return PersonalAgenda
141
     */
142
    public function setDate($date)
143
    {
144
        $this->date = $date;
145
146
        return $this;
147
    }
148
149
    /**
150
     * Get date.
151
     *
152
     * @return \DateTime
153
     */
154
    public function getDate()
155
    {
156
        return $this->date;
157
    }
158
159
    /**
160
     * Set enddate.
161
     *
162
     * @param \DateTime $value
163
     *
164
     * @return PersonalAgenda
165
     */
166
    public function setEndDate($value)
167
    {
168
        $this->endDate = $value;
169
170
        return $this;
171
    }
172
173
    /**
174
     * @return \DateTime
175
     */
176
    public function getEndDate()
177
    {
178
        return $this->endDate;
179
    }
180
181
    /**
182
     * Set parentEventId.
183
     *
184
     * @param int $parentEventId
185
     *
186
     * @return PersonalAgenda
187
     */
188
    public function setParentEventId($parentEventId)
189
    {
190
        $this->parentEventId = $parentEventId;
191
192
        return $this;
193
    }
194
195
    /**
196
     * Get parentEventId.
197
     *
198
     * @return int
199
     */
200
    public function getParentEventId()
201
    {
202
        return $this->parentEventId;
203
    }
204
205
    /**
206
     * Set allDay.
207
     *
208
     * @param int $allDay
209
     *
210
     * @return PersonalAgenda
211
     */
212
    public function setAllDay($allDay)
213
    {
214
        $this->allDay = $allDay;
215
216
        return $this;
217
    }
218
219
    /**
220
     * Get allDay.
221
     *
222
     * @return int
223
     */
224
    public function getAllDay()
225
    {
226
        return $this->allDay;
227
    }
228
229
    /**
230
     * Get id.
231
     *
232
     * @return int
233
     */
234
    public function getId()
235
    {
236
        return $this->id;
237
    }
238
239
    /**
240
     * @return string
241
     */
242
    public function getColor()
243
    {
244
        return $this->color;
245
    }
246
247
    /**
248
     * @param string $color
249
     *
250
     * @return PersonalAgenda
251
     */
252
    public function setColor($color)
253
    {
254
        $this->color = $color;
255
256
        return $this;
257
    }
258
}
259