Completed
Push — 2.1 ( b2264f...546063 )
by Rafał
08:42
created

RouteTrait::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
/*
4
 * This file is part of the Superdesk Web Publisher Content Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Bundle\ContentBundle\Model;
16
17
trait RouteTrait
18
{
19
    /**
20
     * @var string
21
     */
22
    protected $templateName;
23
24
    /**
25
     * @var string
26
     */
27
    protected $articlesTemplateName;
28
29
    /**
30
     * @var string
31
     */
32
    protected $type;
33
34
    /**
35
     * @var int
36
     */
37
    protected $cacheTimeInSeconds = 0;
38
39
    /**
40
     * @var string
41
     */
42
    protected $name;
43
44
    /**
45
     * @var string
46
     */
47
    protected $description;
48
49
    /**
50
     * @var string
51
     */
52
    protected $slug;
53
54
    /**
55
     * @var string
56
     */
57
    protected $variablePattern;
58
59
    /**
60
     * @var string
61
     */
62
    protected $staticPrefix;
63
64
    /**
65
     * @var int
66
     */
67
    protected $position;
68
69
    /**
70
     * @return string
71
     */
72
    public function getName()
73
    {
74
        return $this->name;
75
    }
76
77
    /**
78
     * Rename a route by setting its new name.
79
     *
80
     * @param string $name the new name
81
     */
82
    public function setName($name)
83
    {
84
        $this->name = $name;
85
    }
86
87
    /**
88
     * @return string
89
     */
90
    public function getDescription(): ?string
91
    {
92
        return $this->description;
93
    }
94
95
    /**
96
     * @param string|null $description
97
     */
98
    public function setDescription(?string $description): void
99
    {
100
        $this->description = $description;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getSlug(): ?string
107
    {
108
        return $this->slug;
109
    }
110
111
    /**
112
     * Slug is used for static prefix generation.
113
     *
114
     * @param string|null $slug
115
     */
116
    public function setSlug(?string $slug): void
117
    {
118
        $this->slug = $slug;
119
    }
120
121
    /**
122
     * @return string
123
     */
124
    public function getVariablePattern()
125
    {
126
        return $this->variablePattern;
127
    }
128
129
    /**
130
     * @param string $variablePattern
131
     */
132
    public function setVariablePattern($variablePattern)
133
    {
134
        $this->variablePattern = $variablePattern;
135
    }
136
137
    /**
138
     * {@inheritdoc}
139
     */
140
    public function getTemplateName()
141
    {
142
        return $this->templateName;
143
    }
144
145
    /**
146
     * {@inheritdoc}
147
     */
148
    public function setTemplateName($templateName)
149
    {
150
        $this->templateName = $templateName;
151
    }
152
153
    /**
154
     * {@inheritdoc}
155
     */
156
    public function getArticlesTemplateName()
157
    {
158
        return $this->articlesTemplateName;
159
    }
160
161
    /**
162
     * {@inheritdoc}
163
     */
164
    public function setArticlesTemplateName($articlesTemplateName)
165
    {
166
        $this->articlesTemplateName = $articlesTemplateName;
167
    }
168
169
    /**
170
     * {@inheritdoc}
171
     */
172
    public function getType()
173
    {
174
        return $this->type;
175
    }
176
177
    /**
178
     * {@inheritdoc}
179
     */
180
    public function setType($type)
181
    {
182
        $this->type = $type;
183
    }
184
185
    /**
186
     * @return int
187
     */
188
    public function getCacheTimeInSeconds()
189
    {
190
        return $this->cacheTimeInSeconds;
191
    }
192
193
    /**
194
     * @param int $cacheTimeInSeconds
195
     */
196
    public function setCacheTimeInSeconds($cacheTimeInSeconds)
197
    {
198
        $this->cacheTimeInSeconds = $cacheTimeInSeconds;
199
    }
200
201
    /**
202
     * @return string
203
     */
204
    public function getStaticPrefix()
205
    {
206
        return $this->staticPrefix;
207
    }
208
209
    /**
210
     * @param string $staticPrefix
211
     */
212
    public function setStaticPrefix($staticPrefix)
213
    {
214
        $this->staticPrefix = $staticPrefix;
215
    }
216
217
    /**
218
     * @return int
219
     */
220
    public function getPosition()
221
    {
222
        return $this->position;
223
    }
224
225
    /**
226
     * @param int $position
227
     */
228
    public function setPosition(int $position)
229
    {
230
        $this->position = $position;
231
    }
232
}
233