1 | <?php namespace Anomaly\Streams\Platform\Ui\ControlPanel\Component\Navigation; |
||
17 | class NavigationLink implements NavigationLinkInterface |
||
18 | { |
||
19 | |||
20 | use DispatchesJobs; |
||
21 | |||
22 | /** |
||
23 | * The links slug. |
||
24 | * |
||
25 | * @var null|string |
||
26 | */ |
||
27 | protected $slug = null; |
||
28 | |||
29 | /** |
||
30 | * The link icon. |
||
31 | * |
||
32 | * @var null|string |
||
33 | */ |
||
34 | protected $icon = null; |
||
35 | |||
36 | /** |
||
37 | * The links title. |
||
38 | * |
||
39 | * @var null|string |
||
40 | */ |
||
41 | protected $title = 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 favorite flag. |
||
59 | * |
||
60 | * @var bool |
||
61 | */ |
||
62 | protected $favorite = false; |
||
63 | |||
64 | /** |
||
65 | * The links attributes. |
||
66 | * |
||
67 | * @var array |
||
68 | */ |
||
69 | protected $attributes = []; |
||
70 | |||
71 | /** |
||
72 | * The links permission. |
||
73 | * |
||
74 | * @var null|string |
||
75 | */ |
||
76 | protected $permission = null; |
||
77 | |||
78 | /** |
||
79 | * The links breadcrumb. |
||
80 | * |
||
81 | * @var null|string |
||
82 | */ |
||
83 | protected $breadcrumb = null; |
||
84 | |||
85 | /** |
||
86 | * @var Image |
||
87 | */ |
||
88 | protected $image; |
||
89 | |||
90 | /** |
||
91 | * @var Asset |
||
92 | */ |
||
93 | protected $asset; |
||
94 | |||
95 | /** |
||
96 | * Create a new NavigationLink instance. |
||
97 | * |
||
98 | * @param Image $image |
||
99 | * @param Asset $asset |
||
100 | * @param IconRegistry $icons |
||
|
|||
101 | */ |
||
102 | public function __construct(Image $image, Asset $asset) |
||
107 | |||
108 | public function icon($default = 'fa fa-puzzle-piece') |
||
118 | |||
119 | /** |
||
120 | * Get the slug. |
||
121 | * |
||
122 | * @return null|string |
||
123 | */ |
||
124 | public function getSlug() |
||
128 | |||
129 | /** |
||
130 | * Set the slug. |
||
131 | * |
||
132 | * @param $slug |
||
133 | * @return $this |
||
134 | */ |
||
135 | public function setSlug($slug) |
||
141 | |||
142 | /** |
||
143 | * Get the icon. |
||
144 | * |
||
145 | * @return null|string |
||
146 | */ |
||
147 | public function getIcon() |
||
151 | |||
152 | /** |
||
153 | * Set the icon. |
||
154 | * |
||
155 | * @param $icon |
||
156 | * @return $this |
||
157 | */ |
||
158 | public function setIcon($icon) |
||
164 | |||
165 | /** |
||
166 | * Get the title. |
||
167 | * |
||
168 | * @return string |
||
169 | */ |
||
170 | public function getTitle() |
||
174 | |||
175 | /** |
||
176 | * Set the title. |
||
177 | * |
||
178 | * @param string $title |
||
179 | */ |
||
180 | public function setTitle($title) |
||
184 | |||
185 | /** |
||
186 | * Get the class. |
||
187 | * |
||
188 | * @return string |
||
189 | */ |
||
190 | public function getClass() |
||
194 | |||
195 | /** |
||
196 | * Set the class. |
||
197 | * |
||
198 | * @param $class |
||
199 | * @return $this |
||
200 | */ |
||
201 | public function setClass($class) |
||
207 | |||
208 | /** |
||
209 | * Get the active flag. |
||
210 | * |
||
211 | * @return boolean |
||
212 | */ |
||
213 | public function isActive() |
||
217 | |||
218 | /** |
||
219 | * Set the active flag. |
||
220 | * |
||
221 | * @param boolean $active |
||
222 | */ |
||
223 | public function setActive($active) |
||
229 | |||
230 | /** |
||
231 | * Get the favorite flag. |
||
232 | * |
||
233 | * @return boolean |
||
234 | */ |
||
235 | public function isFavorite() |
||
239 | |||
240 | /** |
||
241 | * Set the favorite flag. |
||
242 | * |
||
243 | * @param boolean $favorite |
||
244 | */ |
||
245 | public function setFavorite($favorite) |
||
251 | |||
252 | /** |
||
253 | * Get the attributes. |
||
254 | * |
||
255 | * @return array |
||
256 | */ |
||
257 | public function getAttributes() |
||
261 | |||
262 | /** |
||
263 | * Set the attributes. |
||
264 | * |
||
265 | * @param array $attributes |
||
266 | */ |
||
267 | public function setAttributes(array $attributes) |
||
271 | |||
272 | /** |
||
273 | * Get the permission. |
||
274 | * |
||
275 | * @return null|string |
||
276 | */ |
||
277 | public function getPermission() |
||
281 | |||
282 | /** |
||
283 | * Set the permission. |
||
284 | * |
||
285 | * @param $permission |
||
286 | * @return $this |
||
287 | */ |
||
288 | public function setPermission($permission) |
||
294 | |||
295 | /** |
||
296 | * Get the breadcrumb. |
||
297 | * |
||
298 | * @return null|string |
||
299 | */ |
||
300 | public function getBreadcrumb() |
||
304 | |||
305 | /** |
||
306 | * Set the breadcrumb. |
||
307 | * |
||
308 | * @param $breadcrumb |
||
309 | * @return $this |
||
310 | */ |
||
311 | public function setBreadcrumb($breadcrumb) |
||
317 | |||
318 | /** |
||
319 | * Get the HREF attribute. |
||
320 | * |
||
321 | * @param null $path |
||
322 | * @return string |
||
323 | */ |
||
324 | public function getHref($path = null) |
||
328 | } |
||
329 |
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.