Test Setup Failed
Push — master ( 57adac...109a56 )
by Valery
05:54 queued 11s
created

Page::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Entity;
6
7
use App\Entity\Traits\EntityIdTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
10
use Symfony\Component\Validator\Constraints as Assert;
11
12
/**
13
 * @ORM\Entity(repositoryClass="App\Repository\PageRepository")
14
 * @UniqueEntity({"slug", "locale"})
15
 * @ORM\Table(
16
 *    uniqueConstraints={
17
 *        @ORM\UniqueConstraint(name="slug_locale_unique_key",
18
 *            columns={"slug", "locale"})
19
 *    }
20
 * )
21
 */
22
class Page
23
{
24
    use EntityIdTrait;
25
26
    /**
27
     * @ORM\Column(type="string", length=255)
28
     */
29
    private $title;
30
31
    /**
32
     * @ORM\Column(type="string", length=255)
33
     */
34
    private $description;
35
36
    /**
37
     * @ORM\Column(type="string", length=255)
38
     */
39
    private $slug;
40
41
    /**
42
     * @ORM\Column(type="string", length=2, options={"default":"en"})
43
     */
44
    private $locale;
45
46
    /**
47
     * @ORM\Column(type="text", nullable=true)
48
     */
49
    private $content;
50
51
    /**
52
     * @ORM\Column(type="boolean")
53
     */
54
    private $show_in_menu;
55
56
    /**
57
     * @ORM\Column(type="boolean")
58
     */
59
    private $add_contact_form;
60
61
    /**
62
     * @ORM\Column(type="string", length=255, nullable=true)
63
     * @Assert\Email()
64
     */
65
    private $contact_email_address;
66
67
    public function getTitle(): ?string
68
    {
69
        return $this->title;
70
    }
71
72
    public function setTitle(string $title): self
73
    {
74
        $this->title = $title;
75
76
        return $this;
77
    }
78
79
    public function getDescription(): ?string
80
    {
81
        return $this->description;
82
    }
83
84
    public function setDescription(string $description): self
85
    {
86
        $this->description = $description;
87
88
        return $this;
89
    }
90
91
    public function getSlug(): ?string
92
    {
93
        return $this->slug;
94
    }
95
96
    public function setSlug(string $slug): self
97
    {
98
        $this->slug = $slug;
99
100
        return $this;
101
    }
102
103
    public function getContent(): ?string
104
    {
105
        return $this->content;
106
    }
107
108
    public function setContent(string $content): self
109
    {
110
        $this->content = $content;
111
112
        return $this;
113
    }
114
115
    public function getShowInMenu(): ?bool
116
    {
117
        return $this->show_in_menu;
118
    }
119
120
    public function setShowInMenu(bool $show_in_menu): self
121
    {
122
        $this->show_in_menu = $show_in_menu;
123
124
        return $this;
125
    }
126
127
    public function getAddContactForm(): ?bool
128
    {
129
        return $this->add_contact_form;
130
    }
131
132
    public function setAddContactForm(bool $add_contact_form): self
133
    {
134
        $this->add_contact_form = $add_contact_form;
135
136
        return $this;
137
    }
138
139
    public function getContactEmailAddress(): ?string
140
    {
141
        return $this->contact_email_address;
142
    }
143
144
    public function setContactEmailAddress(?string $contact_email_address): self
145
    {
146
        $this->contact_email_address = $contact_email_address;
147
148
        return $this;
149
    }
150
151
    public function getLocale(): string
152
    {
153
        return $this->locale;
154
    }
155
156
    public function setLocale(string $locale): self
157
    {
158
        $this->locale = $locale;
159
160
        return $this;
161
    }
162
}
163