Completed
Push — master ( 9f183a...8cd85a )
by Julito
13:16
created

Illustration::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nop 1
dl 0
loc 5
rs 10
nc 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity;
5
6
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
7
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
8
use Doctrine\ORM\Mapping as ORM;
9
use Gedmo\Timestampable\Traits\TimestampableEntity;
10
11
/**
12
 * Illustration.
13
 *
14
 * @ORM\Table(name="illustration")
15
 * @ORM\Entity
16
 */
17
class Illustration extends AbstractResource implements ResourceInterface
18
{
19
    use TimestampableEntity;
20
21
    /**
22
     * @var int
23
     *
24
     * @ORM\Column(name="id", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="AUTO")
27
     */
28
    protected $id;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
34
     */
35
    protected $name;
36
37
    /**
38
     * Illustration constructor.
39
     */
40
    public function __construct()
41
    {
42
        $this->name = 'illustration';
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getId(): int
49
    {
50
        return $this->id;
51
    }
52
53
    /**
54
     * @param int $id
55
     *
56
     * @return Illustration
57
     */
58
    public function setId(int $id): Illustration
59
    {
60
        $this->id = $id;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getName(): string
69
    {
70
        return $this->name;
71
    }
72
73
    /**
74
     * @param string $name
75
     *
76
     * @return Illustration
77
     */
78
    public function setName(string $name): Illustration
79
    {
80
        $this->name = $name;
81
82
        return $this;
83
    }
84
85
    /**
86
     * Resource identifier.
87
     *
88
     * @return int
89
     */
90
    public function getResourceIdentifier(): int
91
    {
92
        return $this->getId();
93
    }
94
95
    /**
96
     * @return string
97
     */
98
    public function getResourceName(): string
99
    {
100
        return $this->getName();
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getToolName(): string
107
    {
108
        return 'Illustration';
109
    }
110
}
111