[TASK] CGL cleanup for the new module menu classes
[Packages/TYPO3.CMS.git] / typo3 / classes / Domain / Model / BackendModule.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2012 - Susanne Moog <typo3@susannemoog.de>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27
28 /**
29 * Model for menu entries
30 *
31 * @author Susanne Moog <typo3@susannemoog.de>
32 * @package TYPO3
33 * @subpackage core
34 */
35 class Typo3_Domain_Model_BackendModule {
36
37 /**
38 * @var string $title
39 */
40 protected $title = '';
41
42 /**
43 * @var string $name
44 */
45 protected $name = '';
46
47 /**
48 * @var array $icon
49 */
50 protected $icon = array();
51
52 /**
53 * @var string $link
54 */
55 protected $link = '';
56
57 /**
58 * @var string $onClick
59 */
60 protected $onClick = '';
61
62 /**
63 * @var string $description
64 */
65 protected $description = '';
66
67 /**
68 * @var string $navigationComponentId
69 */
70 protected $navigationComponentId = '';
71
72 /**
73 * @var SplObjectStorage $children
74 */
75 protected $children;
76
77 /**
78 * construct
79 */
80 public function __construct() {
81 $this->children = new SplObjectStorage();
82 }
83
84 /**
85 * Set children
86 *
87 * @param \SplObjectStorage $children
88 * @return void
89 */
90 public function setChildren($children) {
91 $this->children = $children;
92 }
93
94 /**
95 * Get children
96 *
97 * @return \SplObjectStorage
98 */
99 public function getChildren() {
100 return $this->children;
101 }
102
103 /**
104 * Add Child
105 *
106 * @param Typo3_Domain_Model_BackendModule $child
107 * @return void
108 */
109 public function addChild(Typo3_Domain_Model_BackendModule $child) {
110 $this->children->attach($child);
111 }
112
113 /**
114 * Set icon
115 *
116 * @param array $icon
117 * @return void
118 */
119 public function setIcon(array $icon) {
120 $this->icon = $icon;
121 }
122
123 /**
124 * Get icon
125 *
126 * @return array
127 */
128 public function getIcon() {
129 return $this->icon;
130 }
131
132 /**
133 * Set name
134 *
135 * @param string $name
136 * @return void
137 */
138 public function setName($name) {
139 $this->name = $name;
140 }
141
142 /**
143 * Get name
144 *
145 * @return string
146 */
147 public function getName() {
148 return $this->name;
149 }
150
151 /**
152 * Set title
153 *
154 * @param string $title
155 * @return void
156 */
157 public function setTitle($title) {
158 $this->title = $title;
159 }
160
161 /**
162 * Get Title
163 *
164 * @return string
165 */
166 public function getTitle() {
167 return $this->title;
168 }
169
170 /**
171 * Set Link
172 *
173 * @param string $link
174 * @return void
175 */
176 public function setLink($link) {
177 $this->link = $link;
178 }
179
180 /**
181 * Get Link
182 *
183 * @return string
184 */
185 public function getLink() {
186 return $this->link;
187 }
188
189 /**
190 * Set Description
191 *
192 * @param string $description
193 * @return void
194 */
195 public function setDescription($description) {
196 $this->description = $description;
197 }
198
199 /**
200 * Get Description
201 *
202 * @return string
203 */
204 public function getDescription() {
205 return $this->description;
206 }
207
208 /**
209 * Set Navigation Component Id
210 *
211 * @param string $navigationComponentId
212 * @return void
213 */
214 public function setNavigationComponentId($navigationComponentId) {
215 $this->navigationComponentId = $navigationComponentId;
216 }
217
218 /**
219 * Get Navigation Component Id
220 *
221 * @return string
222 */
223 public function getNavigationComponentId() {
224 return $this->navigationComponentId;
225 }
226
227 /**
228 * Set onClick
229 *
230 * @param string $onClick
231 * @return void
232 */
233 public function setOnClick($onClick) {
234 $this->onClick = $onClick;
235 }
236
237 /**
238 * Get onClick
239 *
240 * @return string
241 */
242 public function getOnClick() {
243 return $this->onClick;
244 }
245 }
246
247 ?>