1 | <?php |
||
23 | abstract class AbstractNavigationNode extends AbstractNode { |
||
24 | |||
25 | /** |
||
26 | * Active ? |
||
27 | * |
||
28 | * @var boolean |
||
29 | */ |
||
30 | private $active; |
||
31 | |||
32 | /** |
||
33 | * Enable ? |
||
34 | * |
||
35 | * @var boolean |
||
36 | */ |
||
37 | private $enable; |
||
38 | |||
39 | /** |
||
40 | * Icon. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | private $icon; |
||
45 | |||
46 | /** |
||
47 | * Route. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | private $route; |
||
52 | |||
53 | /** |
||
54 | * Target. |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | private $target; |
||
59 | |||
60 | /** |
||
61 | * URL. |
||
62 | * |
||
63 | * @var string |
||
64 | */ |
||
65 | private $url; |
||
66 | |||
67 | /** |
||
68 | * Visible ? |
||
69 | * |
||
70 | * @var boolean |
||
71 | */ |
||
72 | private $visible; |
||
73 | |||
74 | /** |
||
75 | * Constructor. |
||
76 | * |
||
77 | * @param string $name The name. |
||
78 | * @param string $icon The icon. |
||
79 | * @param string $route The route. |
||
80 | */ |
||
81 | protected function __construct($name, $icon = null, $route = null) { |
||
91 | |||
92 | /** |
||
93 | * Get the active. |
||
94 | * |
||
95 | * @return boolean Returns the active. |
||
96 | */ |
||
97 | final public function getActive() { |
||
100 | |||
101 | /** |
||
102 | * Get the enable. |
||
103 | * |
||
104 | * @return boolean Returns the enable. |
||
105 | */ |
||
106 | final public function getEnable() { |
||
109 | |||
110 | /** |
||
111 | * Get the icon. |
||
112 | * |
||
113 | * @return string Returns the icon. |
||
114 | */ |
||
115 | final public function getIcon() { |
||
118 | |||
119 | /** |
||
120 | * Get the route. |
||
121 | * |
||
122 | * @return string Returns the route. |
||
123 | */ |
||
124 | final public function getRoute() { |
||
127 | |||
128 | /** |
||
129 | * Get the target. |
||
130 | * |
||
131 | * @return string Returns the target. |
||
132 | */ |
||
133 | final public function getTarget() { |
||
136 | |||
137 | /** |
||
138 | * Get the URL. |
||
139 | * |
||
140 | * @return string Returns the URL. |
||
141 | */ |
||
142 | final public function getUrl() { |
||
145 | |||
146 | /** |
||
147 | * Get the visible. |
||
148 | * |
||
149 | * @return boolean Returns the visible. |
||
150 | */ |
||
151 | final public function getVisible() { |
||
154 | |||
155 | /** |
||
156 | * Determines if the node is displayable. |
||
157 | * |
||
158 | * @return boolean Returns true in case of success, false otherwise. |
||
159 | */ |
||
160 | final public function isDisplayable() { |
||
175 | |||
176 | /** |
||
177 | * Set the active. |
||
178 | * |
||
179 | * @param boolean $active Active ? |
||
180 | * @return NavigationNode Returns the navigation node. |
||
181 | */ |
||
182 | final public function setActive($active) { |
||
186 | |||
187 | /** |
||
188 | * Set the enable. |
||
189 | * |
||
190 | * @param boolean $enable Enable ?. |
||
191 | * @return NavigationNode Returns the navigation node. |
||
192 | */ |
||
193 | final public function setEnable($enable) { |
||
197 | |||
198 | /** |
||
199 | * Set the icon. |
||
200 | * |
||
201 | * @param string $icon The icon. |
||
202 | * @return NavigationNode Returns the navigation node. |
||
203 | */ |
||
204 | final public function setIcon($icon) { |
||
208 | |||
209 | /** |
||
210 | * Set the route. |
||
211 | * |
||
212 | * @param string $route The route. |
||
213 | * @return NavigationNode Returns the navigation node. |
||
214 | */ |
||
215 | final public function setRoute($route) { |
||
219 | |||
220 | /** |
||
221 | * Set the target. |
||
222 | * |
||
223 | * @param string $target The target. |
||
224 | * @return NavigationNode Returns the navigation node. |
||
225 | */ |
||
226 | final public function setTarget($target) { |
||
230 | |||
231 | /** |
||
232 | * Set the URL. |
||
233 | * |
||
234 | * @param string $url The URL. |
||
235 | * @return NavigationNode Returns the navigation node. |
||
236 | */ |
||
237 | final public function setUrl($url) { |
||
241 | |||
242 | /** |
||
243 | * Set the visible. |
||
244 | * |
||
245 | * @param boolean $visible Visible ? |
||
246 | * @return NavigationNode Returns the navigation node. |
||
247 | */ |
||
248 | final protected function setVisible($visible) { |
||
252 | |||
253 | } |
||
254 |