1 | <?php namespace Arcanesoft\Core\Helpers\UI; |
||
14 | class Label |
||
15 | { |
||
16 | /* ----------------------------------------------------------------- |
||
17 | | Main Methods |
||
18 | | ----------------------------------------------------------------- |
||
19 | */ |
||
20 | |||
21 | /** |
||
22 | * Generate active icon label. |
||
23 | * |
||
24 | * @param bool $active |
||
25 | * @param array $options |
||
26 | * @param bool $withTooltip |
||
27 | * |
||
28 | * @return \Illuminate\Support\HtmlString |
||
29 | */ |
||
30 | 6 | public static function activeIcon($active, array $options = [], $withTooltip = true) |
|
54 | |||
55 | /** |
||
56 | * Generate active status label. |
||
57 | * |
||
58 | * @param bool $active |
||
59 | * @param array $options |
||
60 | * @param bool $withIcon |
||
61 | * |
||
62 | * @return \Illuminate\Support\HtmlString |
||
63 | */ |
||
64 | 6 | public static function activeStatus($active, array $options = [], $withIcon = true) |
|
87 | |||
88 | /** |
||
89 | * Generate check status label. |
||
90 | * |
||
91 | * @param bool $checked |
||
92 | * @param array $options |
||
93 | * @param bool $withTooltip |
||
94 | * |
||
95 | * @return \Illuminate\Support\HtmlString |
||
96 | */ |
||
97 | 4 | public static function checkIcon($checked, array $options = [], $withTooltip = true) |
|
122 | |||
123 | /** |
||
124 | * Generate check status label. |
||
125 | * |
||
126 | * @param bool $checked |
||
127 | * @param array $options |
||
128 | * @param bool $withIcon |
||
129 | * |
||
130 | * @return \Illuminate\Support\HtmlString |
||
131 | */ |
||
132 | 6 | public static function checkStatus($checked, array $options = [], $withIcon = true) |
|
155 | |||
156 | /** |
||
157 | * Generate count label. |
||
158 | * |
||
159 | * @param int|float $count |
||
160 | * @param array $options |
||
161 | * |
||
162 | * @return \Illuminate\Support\HtmlString |
||
163 | */ |
||
164 | 6 | public static function count($count, array $options = []) { |
|
177 | |||
178 | /** |
||
179 | * Generate locked icon label. |
||
180 | * |
||
181 | * @param bool $locked |
||
182 | * @param array $options |
||
183 | * @param bool $withTooltip |
||
184 | * |
||
185 | * @return \Illuminate\Support\HtmlString |
||
186 | */ |
||
187 | 4 | public static function lockedIcon($locked, array $options = [], $withTooltip = true) |
|
211 | |||
212 | /** |
||
213 | * Generate locked status label. |
||
214 | * |
||
215 | * @param bool $locked |
||
216 | * @param array $options |
||
217 | * @param bool $withIcon |
||
218 | * |
||
219 | * @return \Illuminate\Support\HtmlString |
||
220 | */ |
||
221 | 4 | public static function lockedStatus($locked, array $options = [], $withIcon = true) |
|
245 | |||
246 | /** |
||
247 | * Generate trashed icon label. |
||
248 | * |
||
249 | * @param array $options |
||
250 | * @return \Illuminate\Support\HtmlString |
||
251 | */ |
||
252 | 4 | public static function trashedStatus(array $options = [], $withIcon = true) |
|
264 | |||
265 | /* ----------------------------------------------------------------- |
||
266 | | Other Methods |
||
267 | | ----------------------------------------------------------------- |
||
268 | */ |
||
269 | |||
270 | /** |
||
271 | * Generate the label. |
||
272 | * |
||
273 | * @param mixed $value |
||
274 | * @param array $attributes |
||
275 | * |
||
276 | * @return \Illuminate\Support\HtmlString |
||
277 | */ |
||
278 | 40 | protected static function generate($value, array $attributes = []) |
|
284 | |||
285 | /** |
||
286 | * Generate the label with tooltip. |
||
287 | * |
||
288 | * @param string $value |
||
289 | * @param string $title |
||
290 | * @param array $attributes |
||
291 | * |
||
292 | * @return \Illuminate\Support\HtmlString |
||
293 | */ |
||
294 | 10 | protected static function generateWithTooltip($value, $title, array $attributes = []) |
|
301 | |||
302 | /** |
||
303 | * Generate the label with icon & text as value. |
||
304 | * |
||
305 | * @param string $value |
||
306 | * @param string $icon |
||
307 | * @param array $attributes |
||
308 | * |
||
309 | * @return \Illuminate\Support\HtmlString |
||
310 | */ |
||
311 | 12 | protected static function generateWithIcon($value, $icon, array $attributes = []) |
|
315 | |||
316 | /** |
||
317 | * Generate icon tag. |
||
318 | * |
||
319 | * @param string $class |
||
320 | * |
||
321 | * @return string |
||
322 | */ |
||
323 | 26 | protected static function generateIcon($class) |
|
327 | } |
||
328 |