[FEATURE] Add module menu object to the TYPO3 backend
[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 * @param \SplObjectStorage $children
86 */
87 public function setChildren($children) {
88 $this->children = $children;
89 }
90
91 /**
92 * @return \SplObjectStorage
93 */
94 public function getChildren() {
95 return $this->children;
96 }
97
98 /**
99 * @param Typo3_BackendModule $child
100 */
101 public function addChild(Typo3_Domain_Model_BackendModule $child) {
102 $this->children->attach($child);
103 }
104
105 /**
106 * @param array $icon
107 */
108 public function setIcon(array $icon) {
109 $this->icon = $icon;
110 }
111
112 /**
113 * @return array
114 */
115 public function getIcon() {
116 return $this->icon;
117 }
118
119 /**
120 * @param string $name
121 */
122 public function setName($name) {
123 $this->name = $name;
124 }
125
126 /**
127 * @return string
128 */
129 public function getName() {
130 return $this->name;
131 }
132
133 /**
134 * @param string $title
135 */
136 public function setTitle($title) {
137 $this->title = $title;
138 }
139
140 /**
141 * @return string
142 */
143 public function getTitle() {
144 return $this->title;
145 }
146
147 /**
148 * @param string $link
149 */
150 public function setLink($link) {
151 $this->link = $link;
152 }
153
154 /**
155 * @return string
156 */
157 public function getLink() {
158 return $this->link;
159 }
160
161 /**
162 * @param string $description
163 */
164 public function setDescription($description) {
165 $this->description = $description;
166 }
167
168 /**
169 * @return string
170 */
171 public function getDescription() {
172 return $this->description;
173 }
174
175 /**
176 * @param string $navigationComponentId
177 */
178 public function setNavigationComponentId($navigationComponentId) {
179 $this->navigationComponentId = $navigationComponentId;
180 }
181
182 /**
183 * @return string
184 */
185 public function getNavigationComponentId() {
186 return $this->navigationComponentId;
187 }
188
189 /**
190 * @param string $onClick
191 */
192 public function setOnClick($onClick) {
193 $this->onClick = $onClick;
194 }
195
196 /**
197 * @return string
198 */
199 public function getOnClick() {
200 return $this->onClick;
201 }
202 }
203
204 ?>