1 | <?php namespace Anomaly\Streams\Platform\Ui\ControlPanel\Component\Navigation; |
||
12 | class NavigationLink implements NavigationLinkInterface |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The links slug. |
||
17 | * |
||
18 | * @var null|string |
||
19 | */ |
||
20 | protected $slug = null; |
||
21 | |||
22 | /** |
||
23 | * The link icon. |
||
24 | * |
||
25 | * @var null|string |
||
26 | */ |
||
27 | protected $icon = null; |
||
28 | |||
29 | /** |
||
30 | * The links title. |
||
31 | * |
||
32 | * @var null|string |
||
33 | */ |
||
34 | protected $title = null; |
||
35 | |||
36 | /** |
||
37 | * The class. |
||
38 | * |
||
39 | * @var null|string |
||
40 | */ |
||
41 | protected $class = null; |
||
42 | |||
43 | /** |
||
44 | * The active flag. |
||
45 | * |
||
46 | * @var bool |
||
47 | */ |
||
48 | protected $active = false; |
||
49 | |||
50 | /** |
||
51 | * The favorite flag. |
||
52 | * |
||
53 | * @var bool |
||
54 | */ |
||
55 | protected $favorite = false; |
||
56 | |||
57 | /** |
||
58 | * The links attributes. |
||
59 | * |
||
60 | * @var array |
||
61 | */ |
||
62 | protected $attributes = []; |
||
63 | |||
64 | /** |
||
65 | * The links permission. |
||
66 | * |
||
67 | * @var null|string |
||
68 | */ |
||
69 | protected $permission = null; |
||
70 | |||
71 | /** |
||
72 | * The links breadcrumb. |
||
73 | * |
||
74 | * @var null|string |
||
75 | */ |
||
76 | protected $breadcrumb = null; |
||
77 | |||
78 | /** |
||
79 | * Get the slug. |
||
80 | * |
||
81 | * @return null|string |
||
82 | */ |
||
83 | public function getSlug() |
||
87 | |||
88 | /** |
||
89 | * Set the slug. |
||
90 | * |
||
91 | * @param $slug |
||
92 | * @return $this |
||
93 | */ |
||
94 | public function setSlug($slug) |
||
100 | |||
101 | /** |
||
102 | * Get the icon. |
||
103 | * |
||
104 | * @return null|string |
||
105 | */ |
||
106 | public function getIcon() |
||
110 | |||
111 | /** |
||
112 | * Set the icon. |
||
113 | * |
||
114 | * @param $icon |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function setIcon($icon) |
||
123 | |||
124 | /** |
||
125 | * Get the title. |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getTitle() |
||
133 | |||
134 | /** |
||
135 | * Set the title. |
||
136 | * |
||
137 | * @param string $title |
||
138 | */ |
||
139 | public function setTitle($title) |
||
143 | |||
144 | /** |
||
145 | * Get the class. |
||
146 | * |
||
147 | * @return string |
||
148 | */ |
||
149 | public function getClass() |
||
153 | |||
154 | /** |
||
155 | * Set the class. |
||
156 | * |
||
157 | * @param $class |
||
158 | * @return $this |
||
159 | */ |
||
160 | public function setClass($class) |
||
166 | |||
167 | /** |
||
168 | * Get the active flag. |
||
169 | * |
||
170 | * @return boolean |
||
171 | */ |
||
172 | public function isActive() |
||
176 | |||
177 | /** |
||
178 | * Set the active flag. |
||
179 | * |
||
180 | * @param boolean $active |
||
181 | */ |
||
182 | public function setActive($active) |
||
188 | |||
189 | /** |
||
190 | * Get the favorite flag. |
||
191 | * |
||
192 | * @return boolean |
||
193 | */ |
||
194 | public function isFavorite() |
||
198 | |||
199 | /** |
||
200 | * Set the favorite flag. |
||
201 | * |
||
202 | * @param boolean $favorite |
||
203 | */ |
||
204 | public function setFavorite($favorite) |
||
210 | |||
211 | /** |
||
212 | * Get the attributes. |
||
213 | * |
||
214 | * @return array |
||
215 | */ |
||
216 | public function getAttributes() |
||
220 | |||
221 | /** |
||
222 | * Set the attributes. |
||
223 | * |
||
224 | * @param array $attributes |
||
225 | */ |
||
226 | public function setAttributes(array $attributes) |
||
230 | |||
231 | /** |
||
232 | * Get the permission. |
||
233 | * |
||
234 | * @return null|string |
||
235 | */ |
||
236 | public function getPermission() |
||
240 | |||
241 | /** |
||
242 | * Set the permission. |
||
243 | * |
||
244 | * @param $permission |
||
245 | * @return $this |
||
246 | */ |
||
247 | public function setPermission($permission) |
||
253 | |||
254 | /** |
||
255 | * Get the breadcrumb. |
||
256 | * |
||
257 | * @return null|string |
||
258 | */ |
||
259 | public function getBreadcrumb() |
||
263 | |||
264 | /** |
||
265 | * Set the breadcrumb. |
||
266 | * |
||
267 | * @param $breadcrumb |
||
268 | * @return $this |
||
269 | */ |
||
270 | public function setBreadcrumb($breadcrumb) |
||
276 | |||
277 | /** |
||
278 | * Get the HREF attribute. |
||
279 | * |
||
280 | * @param null $path |
||
281 | * @return string |
||
282 | */ |
||
283 | public function getHref($path = null) |
||
287 | } |
||
288 |