1 | <?php namespace Anomaly\Streams\Platform\Ui\ControlPanel\Component\Section; |
||
13 | class Section implements SectionInterface |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * The section slug. |
||
18 | * |
||
19 | * @var null|string |
||
20 | */ |
||
21 | protected $slug = null; |
||
22 | |||
23 | /** |
||
24 | * The section icon. |
||
25 | * |
||
26 | * @var null|string |
||
27 | */ |
||
28 | protected $icon = null; |
||
29 | |||
30 | /** |
||
31 | * The section title. |
||
32 | * |
||
33 | * @var null|string |
||
34 | */ |
||
35 | protected $title = null; |
||
36 | |||
37 | /** |
||
38 | * The class. |
||
39 | * |
||
40 | * @var null|string |
||
41 | */ |
||
42 | protected $class = null; |
||
43 | |||
44 | /** |
||
45 | * The active flag. |
||
46 | * |
||
47 | * @var bool |
||
48 | */ |
||
49 | protected $active = false; |
||
50 | |||
51 | /** |
||
52 | * The path matcher. |
||
53 | * |
||
54 | * @var null|string |
||
55 | */ |
||
56 | protected $matcher = null; |
||
57 | |||
58 | /** |
||
59 | * The section permalink. |
||
60 | * |
||
61 | * @var null|string |
||
62 | */ |
||
63 | protected $permalink = null; |
||
64 | |||
65 | /** |
||
66 | * The section description. |
||
67 | * |
||
68 | * @var null|string |
||
69 | */ |
||
70 | protected $description = null; |
||
71 | |||
72 | /** |
||
73 | * The highlighted flag. |
||
74 | * |
||
75 | * @var bool |
||
76 | */ |
||
77 | protected $highlighted = false; |
||
78 | |||
79 | /** |
||
80 | * The section parent. |
||
81 | * |
||
82 | * @var null|string |
||
83 | */ |
||
84 | protected $parent = null; |
||
85 | |||
86 | /** |
||
87 | * Section buttons. These are only to |
||
88 | * transport input to the button builder. |
||
89 | * |
||
90 | * @var array |
||
91 | */ |
||
92 | protected $buttons = []; |
||
93 | |||
94 | /** |
||
95 | * The section attributes. |
||
96 | * |
||
97 | * @var array |
||
98 | */ |
||
99 | protected $attributes = []; |
||
100 | |||
101 | /** |
||
102 | * The section permission. |
||
103 | * |
||
104 | * @var null|string |
||
105 | */ |
||
106 | protected $permission = null; |
||
107 | |||
108 | /** |
||
109 | * The section breadcrumb. |
||
110 | * |
||
111 | * @var null|string |
||
112 | */ |
||
113 | protected $breadcrumb = null; |
||
114 | |||
115 | /** |
||
116 | * Get the slug. |
||
117 | * |
||
118 | * @return null|string |
||
119 | */ |
||
120 | public function getSlug() |
||
124 | |||
125 | /** |
||
126 | * Set the slug. |
||
127 | * |
||
128 | * @param $slug |
||
129 | * @return $this |
||
130 | */ |
||
131 | public function setSlug($slug) |
||
137 | |||
138 | /** |
||
139 | * Get the icon. |
||
140 | * |
||
141 | * @return null|string |
||
142 | */ |
||
143 | public function getIcon() |
||
147 | |||
148 | /** |
||
149 | * Set the icon. |
||
150 | * |
||
151 | * @param $icon |
||
152 | * @return $this |
||
153 | */ |
||
154 | public function setIcon($icon) |
||
160 | |||
161 | /** |
||
162 | * Get the title. |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getTitle() |
||
170 | |||
171 | /** |
||
172 | * Set the title. |
||
173 | * |
||
174 | * @param string $title |
||
175 | */ |
||
176 | public function setTitle($title) |
||
180 | |||
181 | /** |
||
182 | * Get the class. |
||
183 | * |
||
184 | * @return string |
||
185 | */ |
||
186 | public function getClass() |
||
190 | |||
191 | /** |
||
192 | * Set the class. |
||
193 | * |
||
194 | * @param $class |
||
195 | * @return $this |
||
196 | */ |
||
197 | public function setClass($class) |
||
203 | |||
204 | /** |
||
205 | * Get the active flag. |
||
206 | * |
||
207 | * @return boolean |
||
208 | */ |
||
209 | public function isActive() |
||
213 | |||
214 | /** |
||
215 | * Set the active flag. |
||
216 | * |
||
217 | * @param boolean $active |
||
218 | */ |
||
219 | public function setActive($active) |
||
225 | |||
226 | /** |
||
227 | * Get the matcher. |
||
228 | * |
||
229 | * @return null|string |
||
230 | */ |
||
231 | public function getMatcher() |
||
235 | |||
236 | /** |
||
237 | * Set the matcher. |
||
238 | * |
||
239 | * @param $matcher |
||
240 | * @return $this |
||
241 | */ |
||
242 | public function setMatcher($matcher) |
||
248 | |||
249 | /** |
||
250 | * Get the permalink. |
||
251 | * |
||
252 | * @return null|string |
||
253 | */ |
||
254 | public function getPermalink() |
||
258 | |||
259 | /** |
||
260 | * Set the permalink. |
||
261 | * |
||
262 | * @param $permalink |
||
263 | * @return $this |
||
264 | */ |
||
265 | public function setPermalink($permalink) |
||
271 | |||
272 | /** |
||
273 | * Get the description. |
||
274 | * |
||
275 | * @return null|string |
||
276 | */ |
||
277 | public function getDescription() |
||
281 | |||
282 | /** |
||
283 | * Set the description. |
||
284 | * |
||
285 | * @param $description |
||
286 | * @return $this |
||
287 | */ |
||
288 | public function setDescription($description) |
||
294 | |||
295 | /** |
||
296 | * Get the highlighted flag. |
||
297 | * |
||
298 | * @return boolean |
||
299 | */ |
||
300 | public function isHighlighted() |
||
304 | |||
305 | /** |
||
306 | * Set the highlighted flag. |
||
307 | * |
||
308 | * @param boolean $active |
||
|
|||
309 | * @return $this |
||
310 | */ |
||
311 | public function setHighlighted($highlighted) |
||
317 | |||
318 | /** |
||
319 | * Get the parent. |
||
320 | * |
||
321 | * @return null|string |
||
322 | */ |
||
323 | public function getParent() |
||
327 | |||
328 | /** |
||
329 | * Return if the section is |
||
330 | * a sub-section or not. |
||
331 | * |
||
332 | * @return bool |
||
333 | */ |
||
334 | public function isSubSection() |
||
338 | |||
339 | /** |
||
340 | * Set the parent. |
||
341 | * |
||
342 | * @param $parent |
||
343 | * @return $this |
||
344 | */ |
||
345 | public function setParent($parent) |
||
351 | |||
352 | /** |
||
353 | * Get the buttons. |
||
354 | * |
||
355 | * @return array |
||
356 | */ |
||
357 | public function getButtons() |
||
361 | |||
362 | /** |
||
363 | * Set the buttons. |
||
364 | * |
||
365 | * @param array $buttons |
||
366 | */ |
||
367 | public function setButtons($buttons) |
||
371 | |||
372 | /** |
||
373 | * Get the attributes. |
||
374 | * |
||
375 | * @return array |
||
376 | */ |
||
377 | public function getAttributes() |
||
381 | |||
382 | /** |
||
383 | * Set the attributes. |
||
384 | * |
||
385 | * @param array $attributes |
||
386 | */ |
||
387 | public function setAttributes(array $attributes) |
||
391 | |||
392 | /** |
||
393 | * Get the permission. |
||
394 | * |
||
395 | * @return null|string |
||
396 | */ |
||
397 | public function getPermission() |
||
401 | |||
402 | /** |
||
403 | * Set the permission. |
||
404 | * |
||
405 | * @param $permission |
||
406 | * @return $this |
||
407 | */ |
||
408 | public function setPermission($permission) |
||
414 | |||
415 | /** |
||
416 | * Get the breadcrumb. |
||
417 | * |
||
418 | * @return null|string |
||
419 | */ |
||
420 | public function getBreadcrumb() |
||
424 | |||
425 | /** |
||
426 | * Set the breadcrumb. |
||
427 | * |
||
428 | * @param $breadcrumb |
||
429 | * @return $this |
||
430 | */ |
||
431 | public function setBreadcrumb($breadcrumb) |
||
437 | |||
438 | /** |
||
439 | * Get the HREF attribute. |
||
440 | * |
||
441 | * @param null $path |
||
442 | * @return string |
||
443 | */ |
||
444 | public function getHref($path = null) |
||
448 | |||
449 | /** |
||
450 | * Return the child sections. |
||
451 | * |
||
452 | * @return SectionCollection |
||
453 | */ |
||
454 | public function getChildren() |
||
458 | |||
459 | /** |
||
460 | * Return whether the section |
||
461 | * has children or not. |
||
462 | * |
||
463 | * @return bool |
||
464 | */ |
||
465 | public function hasChildren() |
||
469 | } |
||
470 |
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.