Passed
Push — master ( 4bcd7f...0f4d24 )
by Julito
10:45 queued 10s
created

CGlossary::getCId()   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
 * CGlossary.
14
 *
15
 * @ORM\Table(
16
 *  name="c_glossary"
17
 * )
18
 * @ORM\Entity
19
 */
20
class CGlossary extends AbstractResource implements ResourceInterface
21
{
22
    /**
23
     * @var int
24
     *
25
     * @ORM\Column(name="iid", type="integer")
26
     * @ORM\Id
27
     * @ORM\GeneratedValue
28
     */
29
    protected $iid;
30
31
    /**
32
     * @Assert\NotBlank()
33
     * @ORM\Column(name="name", type="text", nullable=false)
34
     */
35
    protected string $name;
36
37
    /**
38
     * @ORM\Column(name="description", type="text", nullable=false)
39
     */
40
    protected ?string $description;
41
42
    /**
43
     * @var int
44
     *
45
     * @ORM\Column(name="display_order", type="integer", nullable=true)
46
     */
47
    protected $displayOrder;
48
49
    /**
50
     * Set name.
51
     */
52
    public function setName(string $name): self
53
    {
54
        $this->name = $name;
55
56
        return $this;
57
    }
58
59
    /**
60
     * Get name.
61
     */
62
    public function getName(): string
63
    {
64
        return $this->name;
65
    }
66
67
    /**
68
     * Set description.
69
     */
70
    public function setDescription(string $description): self
71
    {
72
        $this->description = $description;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Get description.
79
     *
80
     * @return string
81
     */
82
    public function getDescription()
83
    {
84
        return $this->description;
85
    }
86
87
    /**
88
     * Set displayOrder.
89
     *
90
     * @param int $displayOrder
91
     *
92
     * @return CGlossary
93
     */
94
    public function setDisplayOrder($displayOrder)
95
    {
96
        $this->displayOrder = $displayOrder;
97
98
        return $this;
99
    }
100
101
    /**
102
     * Get displayOrder.
103
     *
104
     * @return int
105
     */
106
    public function getDisplayOrder()
107
    {
108
        return $this->displayOrder;
109
    }
110
111
    /**
112
     * Set glossaryId.
113
     *
114
     * @param int $glossaryId
115
     *
116
     * @return CGlossary
117
     */
118
    public function setGlossaryId($glossaryId)
119
    {
120
        $this->glossaryId = $glossaryId;
121
122
        return $this;
123
    }
124
125
    public function getIid(): int
126
    {
127
        return $this->iid;
128
    }
129
130
    public function getResourceIdentifier(): int
131
    {
132
        return $this->getIid();
133
    }
134
135
    public function getResourceName(): string
136
    {
137
        return $this->getName();
138
    }
139
140
    public function setResourceName(string $name): self
141
    {
142
        return $this->setName($name);
143
    }
144
145
    public function __toString(): string
146
    {
147
        return $this->getName();
148
    }
149
}
150