Passed
Push — master ( b9a35c...ab20b0 )
by Julito
15:41
created

CThematicPlan::getResourceIdentifier()   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\CourseBundle\Entity;
6
7
use Chamilo\CoreBundle\Entity\AbstractResource;
8
use Chamilo\CoreBundle\Entity\ResourceInterface;
9
use Doctrine\ORM\Mapping as ORM;
10
use Symfony\Component\Validator\Constraints as Assert;
11
12
/**
13
 * CThematicPlan.
14
 *
15
 * @ORM\Table(
16
 *  name="c_thematic_plan",
17
 *  indexes={
18
 *      @ORM\Index(name="course", columns={"c_id"}),
19
 *      @ORM\Index(name="thematic_id", columns={"thematic_id", "description_type"})
20
 *  }
21
 * )
22
 * @ORM\Entity
23
 */
24
class CThematicPlan //extends AbstractResource implements ResourceInterface
25
{
26
    /**
27
     * @var int
28
     *
29
     * @ORM\Column(name="iid", type="integer")
30
     * @ORM\Id
31
     * @ORM\GeneratedValue
32
     */
33
    protected $iid;
34
35
    /**
36
     * @var string
37
     *
38
     * @Assert\NotBlank()
39
     *
40
     * @ORM\Column(name="title", type="string", length=255, nullable=false)
41
     */
42
    protected $title;
43
44
    /**
45
     * @var int
46
     *
47
     * @ORM\Column(name="c_id", type="integer")
48
     */
49
    protected $cId;
50
51
    /**
52
     * @var CThematic
53
     *
54
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CThematic", inversedBy="plans")
55
     * @ORM\JoinColumn(name="thematic_id", referencedColumnName="iid")
56
     */
57
    protected $thematic;
58
59
    /**
60
     * @var string
61
     *
62
     * @ORM\Column(name="description", type="text", nullable=true)
63
     */
64
    protected $description;
65
66
    /**
67
     * @var int
68
     *
69
     * @ORM\Column(name="description_type", type="integer", nullable=false)
70
     */
71
    protected $descriptionType;
72
73
    public function __toString(): string
74
    {
75
        return (string) $this->getIid();
76
    }
77
78
    /**
79
     * Set thematicId.
80
     *
81
     * @param int $thematicId
82
     *
83
     * @return CThematicPlan
84
     */
85
    public function setThematicId($thematicId)
86
    {
87
        $this->thematicId = $thematicId;
88
89
        return $this;
90
    }
91
92
    /**
93
     * Get thematicId.
94
     *
95
     * @return int
96
     */
97
    public function getThematicId()
98
    {
99
        return $this->thematicId;
100
    }
101
102
    /**
103
     * Set title.
104
     *
105
     * @param string $title
106
     *
107
     * @return CThematicPlan
108
     */
109
    public function setTitle($title)
110
    {
111
        $this->title = $title;
112
113
        return $this;
114
    }
115
116
    /**
117
     * Get title.
118
     *
119
     * @return string
120
     */
121
    public function getTitle()
122
    {
123
        return $this->title;
124
    }
125
126
    /**
127
     * Set description.
128
     *
129
     * @param string $description
130
     *
131
     * @return CThematicPlan
132
     */
133
    public function setDescription($description)
134
    {
135
        $this->description = $description;
136
137
        return $this;
138
    }
139
140
    /**
141
     * Get description.
142
     *
143
     * @return string
144
     */
145
    public function getDescription()
146
    {
147
        return $this->description;
148
    }
149
150
    /**
151
     * Set descriptionType.
152
     *
153
     * @param int $descriptionType
154
     *
155
     * @return CThematicPlan
156
     */
157
    public function setDescriptionType($descriptionType)
158
    {
159
        $this->descriptionType = $descriptionType;
160
161
        return $this;
162
    }
163
164
    /**
165
     * Get descriptionType.
166
     *
167
     * @return int
168
     */
169
    public function getDescriptionType()
170
    {
171
        return $this->descriptionType;
172
    }
173
174
    /**
175
     * Set cId.
176
     *
177
     * @param int $cId
178
     *
179
     * @return CThematicPlan
180
     */
181
    public function setCId($cId)
182
    {
183
        $this->cId = $cId;
184
185
        return $this;
186
    }
187
188
    /**
189
     * Get cId.
190
     *
191
     * @return int
192
     */
193
    public function getCId()
194
    {
195
        return $this->cId;
196
    }
197
198
    public function getIid(): int
199
    {
200
        return $this->iid;
201
    }
202
203
    public function getThematic(): CThematic
204
    {
205
        return $this->thematic;
206
    }
207
208
    public function setThematic(CThematic $thematic): self
209
    {
210
        $this->thematic = $thematic;
211
212
        return $this;
213
    }
214
215
    /*
216
    public function getResourceIdentifier(): int
217
    {
218
        return $this->getIid();
219
    }
220
221
    public function getResourceName(): string
222
    {
223
        return $this->getTitle();
224
    }
225
226
    public function setResourceName(string $name): self
227
    {
228
        return $this->setTitle($name);
229
    }*/
230
}
231