Passed
Push — master ( 741733...88fc2b )
by
unknown
14:08 queued 26s
created

BackendModule::setLink()   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 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace TYPO3\CMS\Backend\Domain\Model\Module;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
/**
18
 * Model for menu entries
19
 */
20
class BackendModule
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $title = '';
26
27
    /**
28
     * @var string
29
     */
30
    protected $name = '';
31
32
    /**
33
     * @var string
34
     */
35
    protected $icon = '';
36
37
    /**
38
     * @var string
39
     */
40
    protected $link = '';
41
42
    /**
43
     * @var string
44
     */
45
    protected $onClick = '';
46
47
    /**
48
     * @var string
49
     */
50
    protected $description = '';
51
52
    /**
53
     * @var string
54
     */
55
    protected $navigationComponentId = '';
56
57
    /**
58
     * @var string
59
     */
60
    protected $navigationFrameScript = '';
61
62
    /**
63
     * @var string
64
     */
65
    protected $navigationFrameScriptParameters = '';
66
67
    /**
68
     * @var \SplObjectStorage
69
     */
70
    protected $children;
71
72
    /**
73
     * @var bool
74
     */
75
    protected $collapsed = false;
76
77
    /**
78
     * Standalone modules are top-level modules without a group
79
     *
80
     * @var bool
81
     */
82
    protected $standalone = false;
83
84
    /**
85
     * construct
86
     */
87
    public function __construct()
88
    {
89
        $this->children = new \SplObjectStorage();
90
    }
91
92
    /**
93
     * Set children
94
     *
95
     * @param \SplObjectStorage $children
96
     */
97
    public function setChildren($children)
98
    {
99
        $this->children = $children;
100
    }
101
102
    /**
103
     * Get children
104
     *
105
     * @return \SplObjectStorage
106
     */
107
    public function getChildren()
108
    {
109
        return $this->children;
110
    }
111
112
    /**
113
     * Add Child
114
     *
115
     * @param \TYPO3\CMS\Backend\Domain\Model\Module\BackendModule $child
116
     */
117
    public function addChild(\TYPO3\CMS\Backend\Domain\Model\Module\BackendModule $child)
118
    {
119
        $this->children->attach($child);
120
    }
121
122
    /**
123
     * Set icon
124
     *
125
     * @param string $icon
126
     */
127
    public function setIcon($icon)
128
    {
129
        $this->icon = $icon;
130
    }
131
132
    /**
133
     * Get icon
134
     *
135
     * @return string
136
     */
137
    public function getIcon()
138
    {
139
        return $this->icon;
140
    }
141
142
    /**
143
     * Set name
144
     *
145
     * @param string $name
146
     */
147
    public function setName($name)
148
    {
149
        $this->name = $name;
150
    }
151
152
    /**
153
     * Get name
154
     *
155
     * @return string
156
     */
157
    public function getName()
158
    {
159
        return $this->name;
160
    }
161
162
    /**
163
     * Set title
164
     *
165
     * @param string $title
166
     */
167
    public function setTitle($title)
168
    {
169
        $this->title = $title;
170
    }
171
172
    /**
173
     * Get Title
174
     *
175
     * @return string
176
     */
177
    public function getTitle()
178
    {
179
        return $this->title;
180
    }
181
182
    /**
183
     * Set Link
184
     *
185
     * @param string $link
186
     */
187
    public function setLink($link)
188
    {
189
        $this->link = $link;
190
    }
191
192
    /**
193
     * Get Link
194
     *
195
     * @return string
196
     */
197
    public function getLink()
198
    {
199
        return $this->link;
200
    }
201
202
    /**
203
     * Set Description
204
     *
205
     * @param string $description
206
     */
207
    public function setDescription($description)
208
    {
209
        $this->description = $description;
210
    }
211
212
    /**
213
     * Get Description
214
     *
215
     * @return string
216
     */
217
    public function getDescription()
218
    {
219
        return $this->description;
220
    }
221
222
    /**
223
     * Set Navigation Component Id
224
     *
225
     * @param string $navigationComponentId
226
     */
227
    public function setNavigationComponentId($navigationComponentId)
228
    {
229
        $this->navigationComponentId = $navigationComponentId;
230
    }
231
232
    /**
233
     * Get Navigation Component Id
234
     *
235
     * @return string
236
     */
237
    public function getNavigationComponentId()
238
    {
239
        return $this->navigationComponentId;
240
    }
241
242
    /**
243
     * @param string $navigationFrameScript
244
     */
245
    public function setNavigationFrameScript($navigationFrameScript)
246
    {
247
        $this->navigationFrameScript = $navigationFrameScript;
248
    }
249
250
    /**
251
     * @return string
252
     */
253
    public function getNavigationFrameScript()
254
    {
255
        return $this->navigationFrameScript;
256
    }
257
258
    /**
259
     * @param string $navigationFrameScriptParameters
260
     */
261
    public function setNavigationFrameScriptParameters($navigationFrameScriptParameters)
262
    {
263
        $this->navigationFrameScriptParameters = $navigationFrameScriptParameters;
264
    }
265
266
    /**
267
     * @return string
268
     */
269
    public function getNavigationFrameScriptParameters()
270
    {
271
        return $this->navigationFrameScriptParameters;
272
    }
273
274
    /**
275
     * Set onClick
276
     *
277
     * @param string $onClick
278
     */
279
    public function setOnClick($onClick)
280
    {
281
        $this->onClick = $onClick;
282
    }
283
284
    /**
285
     * Get onClick
286
     *
287
     * @return string
288
     */
289
    public function getOnClick()
290
    {
291
        return $this->onClick;
292
    }
293
294
    public function setCollapsed(bool $collapsed): void
295
    {
296
        $this->collapsed = $collapsed;
297
    }
298
299
    public function getCollapsed(): bool
300
    {
301
        return $this->collapsed;
302
    }
303
304
    /**
305
     * @return bool
306
     */
307
    public function isStandalone(): bool
308
    {
309
        return $this->standalone;
310
    }
311
312
    /**
313
     * @param bool $standalone
314
     */
315
    public function setStandalone(bool $standalone): void
316
    {
317
        $this->standalone = $standalone;
318
    }
319
}
320