1 | <?php |
||
23 | abstract class AbstractNavigationNode extends AbstractNode implements NavigationInterface { |
||
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 | * Visible ? |
||
62 | * |
||
63 | * @var boolean |
||
64 | */ |
||
65 | private $visible; |
||
66 | |||
67 | /** |
||
68 | * Constructor. |
||
69 | * |
||
70 | * @param string $name The name. |
||
71 | * @param string $icon The icon. |
||
72 | * @param string $route The route. |
||
73 | */ |
||
74 | protected function __construct($name, $icon = null, $route = self::DEFAULT_HREF) { |
||
83 | |||
84 | /** |
||
85 | * Get the active. |
||
86 | * |
||
87 | * @return boolean Returns the active. |
||
88 | */ |
||
89 | final public function getActive() { |
||
92 | |||
93 | /** |
||
94 | * Get the enable. |
||
95 | * |
||
96 | * @return boolean Returns the enable. |
||
97 | */ |
||
98 | final public function getEnable() { |
||
101 | |||
102 | /** |
||
103 | * Get the icon. |
||
104 | * |
||
105 | * @return string Returns the icon. |
||
106 | */ |
||
107 | final public function getIcon() { |
||
110 | |||
111 | /** |
||
112 | * Get the route. |
||
113 | * |
||
114 | * @return string Returns the route. |
||
115 | */ |
||
116 | final public function getRoute() { |
||
119 | |||
120 | /** |
||
121 | * Get the target. |
||
122 | * |
||
123 | * @return string Returns the target. |
||
124 | */ |
||
125 | final public function getTarget() { |
||
128 | |||
129 | /** |
||
130 | * Get the visible. |
||
131 | * |
||
132 | * @return boolean Returns the visible. |
||
133 | */ |
||
134 | final public function getVisible() { |
||
137 | |||
138 | /** |
||
139 | * Determines if the node is displayable. |
||
140 | * |
||
141 | * @return boolean Returns true in case of success, false otherwise. |
||
142 | */ |
||
143 | final public function isDisplayable() { |
||
158 | |||
159 | /** |
||
160 | * Set the active. |
||
161 | * |
||
162 | * @param boolean $active Active ? |
||
163 | * @return NavigationNode Returns the navigation node. |
||
164 | */ |
||
165 | final public function setActive($active) { |
||
169 | |||
170 | /** |
||
171 | * Set the enable. |
||
172 | * |
||
173 | * @param boolean $enable Enable ?. |
||
174 | * @return NavigationNode Returns the navigation node. |
||
175 | */ |
||
176 | final public function setEnable($enable) { |
||
180 | |||
181 | /** |
||
182 | * Set the icon. |
||
183 | * |
||
184 | * @param string $icon The icon. |
||
185 | * @return NavigationNode Returns the navigation node. |
||
186 | */ |
||
187 | final public function setIcon($icon) { |
||
191 | |||
192 | /** |
||
193 | * Set the route. |
||
194 | * |
||
195 | * @param string $route The route. |
||
196 | * @return NavigationNode Returns the navigation node. |
||
197 | */ |
||
198 | final public function setRoute($route) { |
||
202 | |||
203 | /** |
||
204 | * Set the target. |
||
205 | * |
||
206 | * @param string $target The target. |
||
207 | * @return NavigationNode Returns the navigation node. |
||
208 | */ |
||
209 | final public function setTarget($target) { |
||
213 | |||
214 | /** |
||
215 | * Set the visible. |
||
216 | * |
||
217 | * @param boolean $visible Visible ? |
||
218 | * @return NavigationNode Returns the navigation node. |
||
219 | */ |
||
220 | final protected function setVisible($visible) { |
||
224 | |||
225 | } |
||
226 |