ViewTranslation::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Victoire\Bundle\I18nBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Gedmo\Mapping\Annotation as Gedmo;
7
use JMS\Serializer\Annotation as Serializer;
8
use Knp\DoctrineBehaviors\Model\Translatable\Translation;
9
use Symfony\Component\Validator\Constraints as Assert;
10
11
/**
12
 * Victoire ViewTranslation.
13
 *
14
 * @ORM\Entity()
15
 * @ORM\Table(name="vic_view_translations")
16
 */
17
class ViewTranslation
18
{
19
    use Translation;
20
21
    /**
22
     * @Serializer\Groups({"search"})
23
     */
24
    protected $locale;
25
26
    /**
27
     * @var string
28
     *
29
     * @Assert\NotBlank()
30
     * @ORM\Column(name="name", type="string", length=255)
31
     * @Serializer\Groups({"search"})
32
     */
33
    protected $name;
34
35
    /**
36
     * @var string
37
     *
38
     * @Gedmo\Slug(handlers={
39
     *     @Gedmo\SlugHandler(class="Victoire\Bundle\BusinessEntityBundle\Handler\TwigSlugHandler"
40
     * )},fields={"name"}, updatable=false, unique=false)
41
     * @ORM\Column(name="slug", type="string", length=255)
42
     */
43
    protected $slug;
44
45
    /**
46
     * @var string
47
     *             This property is computed by the method PageSubscriber::buildUrl
48
     */
49
    protected $url;
50
51
    /**
52
     * Get name.
53
     *
54
     * @return string
55
     */
56
    public function getName()
57
    {
58
        return $this->name;
59
    }
60
61
    /**
62
     * Set name.
63
     *
64
     * @param string $name
65
     *
66
     * @return View
67
     */
68
    public function setName($name)
69
    {
70
        $this->name = $name;
71
72
        return $this;
73
    }
74
75
    /**
76
     * Set slug.
77
     *
78
     * @param string $slug
79
     *
80
     * @return View
81
     */
82
    public function setSlug($slug)
83
    {
84
        $this->slug = $slug;
85
86
        return $this;
87
    }
88
89
    /**
90
     * Get slug.
91
     *
92
     * @return string
93
     */
94
    public function getSlug()
95
    {
96
        return $this->slug;
97
    }
98
99
    /**
100
     * @return string
101
     */
102
    public function getUrl()
103
    {
104
        return $this->url;
105
    }
106
107
    /**
108
     * @param string $url
109
     */
0 ignored issues
show
introduced by
Missing @return tag in function comment
Loading history...
110
    public function setUrl($url)
111
    {
112
        $this->url = $url;
113
114
        return $this;
115
    }
116
117
    /**
118
     * {@inheritdoc}
119
     */
120
    public static function getTranslatableEntityClass()
121
    {
122
        return '\\Victoire\\Bundle\\CoreBundle\\Entity\\View';
123
    }
124
}
125