1 | <?php |
||
23 | abstract class AbstractNavigationNode extends AbstractNode implements NavigationInterface { |
||
24 | |||
25 | /** |
||
26 | * Active ? |
||
27 | * |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $active; |
||
31 | |||
32 | /** |
||
33 | * Enable ? |
||
34 | * |
||
35 | * @var bool |
||
36 | */ |
||
37 | private $enable; |
||
38 | |||
39 | /** |
||
40 | * Icon. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | private $icon; |
||
45 | |||
46 | /** |
||
47 | * Matcher. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | private $matcher; |
||
52 | |||
53 | /** |
||
54 | * Target. |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | private $target; |
||
59 | |||
60 | /** |
||
61 | * URI. |
||
62 | * |
||
63 | * @var string |
||
64 | */ |
||
65 | private $uri; |
||
66 | |||
67 | /** |
||
68 | * Visible ? |
||
69 | * |
||
70 | * @var bool |
||
71 | */ |
||
72 | private $visible; |
||
73 | |||
74 | /** |
||
75 | * Constructor. |
||
76 | * |
||
77 | * @param string $name The name. |
||
78 | * @param string $icon The icon. |
||
79 | * @param string $uri The URI. |
||
80 | * @param string $matcher The matcher. |
||
81 | */ |
||
82 | protected function __construct($name, $icon = null, $uri = self::NAVIGATION_HREF_DEFAULT, $matcher = self::NAVIGATION_MATCHER_URL) { |
||
92 | |||
93 | /** |
||
94 | * Get the active. |
||
95 | * |
||
96 | * @return bool Returns the active. |
||
97 | */ |
||
98 | public function getActive() { |
||
101 | |||
102 | /** |
||
103 | * Get the enable. |
||
104 | * |
||
105 | * @return bool Returns the enable. |
||
106 | */ |
||
107 | public function getEnable() { |
||
110 | |||
111 | /** |
||
112 | * Get the icon. |
||
113 | * |
||
114 | * @return string Returns the icon. |
||
115 | */ |
||
116 | public function getIcon() { |
||
119 | |||
120 | /** |
||
121 | * Get the matcher. |
||
122 | * |
||
123 | * @return string Returns the matcher. |
||
124 | */ |
||
125 | public function getMatcher() { |
||
128 | |||
129 | /** |
||
130 | * Get the target. |
||
131 | * |
||
132 | * @return string Returns the target. |
||
133 | */ |
||
134 | public function getTarget() { |
||
135 | return $this->target; |
||
136 | } |
||
137 | |||
138 | /** |
||
139 | * Get the URI. |
||
140 | * |
||
141 | * @return string Returns the URI. |
||
142 | */ |
||
143 | public function getUri() { |
||
144 | return $this->uri; |
||
145 | } |
||
146 | |||
147 | /** |
||
148 | * Get the visible. |
||
149 | * |
||
150 | * @return bool Returns the visible. |
||
151 | */ |
||
152 | public function getVisible() { |
||
155 | |||
156 | /** |
||
157 | * Determines if the node is displayable. |
||
158 | * |
||
159 | * @return bool Returns true in case of success, false otherwise. |
||
160 | */ |
||
161 | public function isDisplayable() { |
||
176 | |||
177 | /** |
||
178 | * Set the active. |
||
179 | * |
||
180 | * @param bool $active Active ? |
||
181 | * @return NavigationNode Returns the navigation node. |
||
182 | */ |
||
183 | public function setActive($active) { |
||
187 | |||
188 | /** |
||
189 | * Set the enable. |
||
190 | * |
||
191 | * @param bool $enable Enable ?. |
||
192 | * @return NavigationNode Returns the navigation node. |
||
193 | */ |
||
194 | public function setEnable($enable) { |
||
198 | |||
199 | /** |
||
200 | * Set the icon. |
||
201 | * |
||
202 | * @param string $icon The icon. |
||
203 | * @return NavigationNode Returns the navigation node. |
||
204 | */ |
||
205 | public function setIcon($icon) { |
||
209 | |||
210 | /** |
||
211 | * Set the mather. |
||
212 | * |
||
213 | * @param string $matcher The matcher. |
||
214 | * @return NavigationNode Returns the navigation node. |
||
215 | */ |
||
216 | public function setMatcher($matcher) { |
||
220 | |||
221 | /** |
||
222 | * Set the target. |
||
223 | * |
||
224 | * @param string $target The target. |
||
225 | * @return NavigationNode Returns the navigation node. |
||
226 | */ |
||
227 | public function setTarget($target) { |
||
228 | $this->target = $target; |
||
229 | return $this; |
||
230 | } |
||
231 | |||
232 | /** |
||
233 | * Set the uri. |
||
234 | * |
||
235 | * @param string $uri The URI. |
||
236 | * @return NavigationNode Returns the navigation node. |
||
237 | */ |
||
238 | public function setUri($uri) { |
||
239 | $this->uri = $uri; |
||
240 | return $this; |
||
241 | } |
||
242 | |||
243 | /** |
||
244 | * Set the visible. |
||
245 | * |
||
246 | * @param bool $visible Visible ? |
||
247 | * @return NavigationNode Returns the navigation node. |
||
248 | */ |
||
249 | protected function setVisible($visible) { |
||
253 | |||
254 | } |
||
255 |