1 | <?php namespace Anomaly\Streams\Platform\Ui\ControlPanel\Component\Section; |
||
12 | class Section implements SectionInterface |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The section slug. |
||
17 | * |
||
18 | * @var null|string |
||
19 | */ |
||
20 | protected $slug = null; |
||
21 | |||
22 | /** |
||
23 | * The section icon. |
||
24 | * |
||
25 | * @var null|string |
||
26 | */ |
||
27 | protected $icon = null; |
||
28 | |||
29 | /** |
||
30 | * The section title. |
||
31 | * |
||
32 | * @var null|string |
||
33 | */ |
||
34 | protected $title = null; |
||
35 | |||
36 | /** |
||
37 | * The section label. |
||
38 | * |
||
39 | * @var null|string |
||
40 | */ |
||
41 | protected $label = null; |
||
42 | |||
43 | /** |
||
44 | * The class. |
||
45 | * |
||
46 | * @var null|string |
||
47 | */ |
||
48 | protected $class = null; |
||
49 | |||
50 | /** |
||
51 | * The active flag. |
||
52 | * |
||
53 | * @var bool |
||
54 | */ |
||
55 | protected $active = false; |
||
56 | |||
57 | /** |
||
58 | * The path matcher. |
||
59 | * |
||
60 | * @var null|string |
||
61 | */ |
||
62 | protected $matcher = null; |
||
63 | |||
64 | /** |
||
65 | * The section permalink. |
||
66 | * |
||
67 | * @var null|string |
||
68 | */ |
||
69 | protected $permalink = null; |
||
70 | |||
71 | /** |
||
72 | * The section description. |
||
73 | * |
||
74 | * @var null|string |
||
75 | */ |
||
76 | protected $description = null; |
||
77 | |||
78 | /** |
||
79 | * The highlighted flag. |
||
80 | * |
||
81 | * @var bool |
||
82 | */ |
||
83 | protected $highlighted = false; |
||
84 | |||
85 | /** |
||
86 | * The section parent. |
||
87 | * |
||
88 | * @var null|string |
||
89 | */ |
||
90 | protected $parent = null; |
||
91 | |||
92 | /** |
||
93 | * Section buttons. These are only to |
||
94 | * transport input to the button builder. |
||
95 | * |
||
96 | * @var array |
||
97 | */ |
||
98 | protected $buttons = []; |
||
99 | |||
100 | /** |
||
101 | * The section attributes. |
||
102 | * |
||
103 | * @var array |
||
104 | */ |
||
105 | protected $attributes = []; |
||
106 | |||
107 | /** |
||
108 | * The section permission. |
||
109 | * |
||
110 | * @var null|string |
||
111 | */ |
||
112 | protected $permission = null; |
||
113 | |||
114 | /** |
||
115 | * The section breadcrumb. |
||
116 | * |
||
117 | * @var null|string |
||
118 | */ |
||
119 | protected $breadcrumb = null; |
||
120 | |||
121 | /** |
||
122 | * Get the slug. |
||
123 | * |
||
124 | * @return null|string |
||
125 | */ |
||
126 | public function getSlug() |
||
130 | |||
131 | /** |
||
132 | * Set the slug. |
||
133 | * |
||
134 | * @param $slug |
||
135 | * @return $this |
||
136 | */ |
||
137 | public function setSlug($slug) |
||
143 | |||
144 | /** |
||
145 | * Get the icon. |
||
146 | * |
||
147 | * @return null|string |
||
148 | */ |
||
149 | public function getIcon() |
||
153 | |||
154 | /** |
||
155 | * Set the icon. |
||
156 | * |
||
157 | * @param $icon |
||
158 | * @return $this |
||
159 | */ |
||
160 | public function setIcon($icon) |
||
166 | |||
167 | /** |
||
168 | * Get the title. |
||
169 | * |
||
170 | * @return string |
||
171 | */ |
||
172 | public function getTitle() |
||
176 | |||
177 | /** |
||
178 | * Set the title. |
||
179 | * |
||
180 | * @param string $title |
||
181 | */ |
||
182 | public function setTitle($title) |
||
186 | |||
187 | /** |
||
188 | * Get the label. |
||
189 | * |
||
190 | * @return string |
||
191 | */ |
||
192 | public function getLabel() |
||
196 | |||
197 | /** |
||
198 | * Set the label. |
||
199 | * |
||
200 | * @param string $label |
||
201 | * @return $this |
||
202 | */ |
||
203 | public function setLabel($label) |
||
209 | |||
210 | /** |
||
211 | * Get the class. |
||
212 | * |
||
213 | * @return string |
||
214 | */ |
||
215 | public function getClass() |
||
219 | |||
220 | /** |
||
221 | * Set the class. |
||
222 | * |
||
223 | * @param $class |
||
224 | * @return $this |
||
225 | */ |
||
226 | public function setClass($class) |
||
232 | |||
233 | /** |
||
234 | * Get the active flag. |
||
235 | * |
||
236 | * @return boolean |
||
237 | */ |
||
238 | public function isActive() |
||
242 | |||
243 | /** |
||
244 | * Set the active flag. |
||
245 | * |
||
246 | * @param boolean $active |
||
247 | */ |
||
248 | public function setActive($active) |
||
254 | |||
255 | /** |
||
256 | * Get the matcher. |
||
257 | * |
||
258 | * @return null|string |
||
259 | */ |
||
260 | public function getMatcher() |
||
264 | |||
265 | /** |
||
266 | * Set the matcher. |
||
267 | * |
||
268 | * @param $matcher |
||
269 | * @return $this |
||
270 | */ |
||
271 | public function setMatcher($matcher) |
||
277 | |||
278 | /** |
||
279 | * Get the permalink. |
||
280 | * |
||
281 | * @return null|string |
||
282 | */ |
||
283 | public function getPermalink() |
||
287 | |||
288 | /** |
||
289 | * Set the permalink. |
||
290 | * |
||
291 | * @param $permalink |
||
292 | * @return $this |
||
293 | */ |
||
294 | public function setPermalink($permalink) |
||
300 | |||
301 | /** |
||
302 | * Get the description. |
||
303 | * |
||
304 | * @return null|string |
||
305 | */ |
||
306 | public function getDescription() |
||
310 | |||
311 | /** |
||
312 | * Set the description. |
||
313 | * |
||
314 | * @param $description |
||
315 | * @return $this |
||
316 | */ |
||
317 | public function setDescription($description) |
||
323 | |||
324 | /** |
||
325 | * Get the highlighted flag. |
||
326 | * |
||
327 | * @return boolean |
||
328 | */ |
||
329 | public function isHighlighted() |
||
333 | |||
334 | /** |
||
335 | * Set the highlighted flag. |
||
336 | * |
||
337 | * @param boolean $active |
||
|
|||
338 | * @return $this |
||
339 | */ |
||
340 | public function setHighlighted($highlighted) |
||
346 | |||
347 | /** |
||
348 | * Get the parent. |
||
349 | * |
||
350 | * @return null|string |
||
351 | */ |
||
352 | public function getParent() |
||
356 | |||
357 | /** |
||
358 | * Return if the section is |
||
359 | * a sub-section or not. |
||
360 | * |
||
361 | * @return bool |
||
362 | */ |
||
363 | public function isSubSection() |
||
367 | |||
368 | /** |
||
369 | * Set the parent. |
||
370 | * |
||
371 | * @param $parent |
||
372 | * @return $this |
||
373 | */ |
||
374 | public function setParent($parent) |
||
380 | |||
381 | /** |
||
382 | * Get the buttons. |
||
383 | * |
||
384 | * @return array |
||
385 | */ |
||
386 | public function getButtons() |
||
390 | |||
391 | /** |
||
392 | * Set the buttons. |
||
393 | * |
||
394 | * @param array $buttons |
||
395 | */ |
||
396 | public function setButtons($buttons) |
||
400 | |||
401 | /** |
||
402 | * Get the attributes. |
||
403 | * |
||
404 | * @return array |
||
405 | */ |
||
406 | public function getAttributes() |
||
410 | |||
411 | /** |
||
412 | * Set the attributes. |
||
413 | * |
||
414 | * @param array $attributes |
||
415 | */ |
||
416 | public function setAttributes(array $attributes) |
||
420 | |||
421 | /** |
||
422 | * Get the permission. |
||
423 | * |
||
424 | * @return null|string |
||
425 | */ |
||
426 | public function getPermission() |
||
430 | |||
431 | /** |
||
432 | * Set the permission. |
||
433 | * |
||
434 | * @param $permission |
||
435 | * @return $this |
||
436 | */ |
||
437 | public function setPermission($permission) |
||
443 | |||
444 | /** |
||
445 | * Get the breadcrumb. |
||
446 | * |
||
447 | * @return null|string |
||
448 | */ |
||
449 | public function getBreadcrumb() |
||
453 | |||
454 | /** |
||
455 | * Set the breadcrumb. |
||
456 | * |
||
457 | * @param $breadcrumb |
||
458 | * @return $this |
||
459 | */ |
||
460 | public function setBreadcrumb($breadcrumb) |
||
466 | |||
467 | /** |
||
468 | * Get the HREF attribute. |
||
469 | * |
||
470 | * @param null $path |
||
471 | * @return string |
||
472 | */ |
||
473 | public function getHref($path = null) |
||
477 | |||
478 | /** |
||
479 | * Return the child sections. |
||
480 | * |
||
481 | * @return SectionCollection |
||
482 | */ |
||
483 | public function getChildren() |
||
487 | |||
488 | /** |
||
489 | * Return whether the section |
||
490 | * has children or not. |
||
491 | * |
||
492 | * @return bool |
||
493 | */ |
||
494 | public function hasChildren() |
||
498 | } |
||
499 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.